From 71357506a47d49a9743001ccb5210a366bf96c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Thu, 22 Aug 2024 14:27:01 +0200 Subject: [PATCH] Disable Decimal as a SQLType on Swift 6, crashes swiftc ... --- Sources/Lighter/Schema/SQLiteValueType.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Sources/Lighter/Schema/SQLiteValueType.swift b/Sources/Lighter/Schema/SQLiteValueType.swift index a193952..daecf82 100644 --- a/Sources/Lighter/Schema/SQLiteValueType.swift +++ b/Sources/Lighter/Schema/SQLiteValueType.swift @@ -699,6 +699,13 @@ extension URL { } } +#if compiler(<6) // Unavailable due to a swiftc crasher in 16b6 + //SILFunction type mismatch for 'NSDecimalString': + // '$@convention(c) (UnsafePointer, Optional) + // -> @autoreleased Optional' + // != + // '$@convention(c) (UnsafePointer, Optional) + // -> @autoreleased NSString' extension Decimal : SQLiteValueType { public struct SQLCouldNotParseDecimal: Swift.Error, Sendable { @@ -752,6 +759,7 @@ extension Decimal : SQLiteValueType { .bind(unsafeSQLite3StatementHandle: stmt, index: index, then: execute) } } +#endif // compiler(<6) // Unavailable due to a swiftc crasher in 16b6 extension UUID : SQLiteValueType { @@ -847,4 +855,5 @@ extension UUID : SQLiteValueType { } } } + #endif // canImport(Foundation)