Skip to content

Commit

Permalink
Disable Decimal as a SQLType on Swift 6, crashes swiftc
Browse files Browse the repository at this point in the history
...
  • Loading branch information
helje5 committed Aug 22, 2024
1 parent 28a0760 commit 7135750
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/Lighter/Schema/SQLiteValueType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Decimal>, Optional<AnyObject>)
// -> @autoreleased Optional<NSString>'
// !=
// '$@convention(c) (UnsafePointer<Decimal>, Optional<AnyObject>)
// -> @autoreleased NSString'
extension Decimal : SQLiteValueType {

public struct SQLCouldNotParseDecimal: Swift.Error, Sendable {
Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -847,4 +855,5 @@ extension UUID : SQLiteValueType {
}
}
}

#endif // canImport(Foundation)

0 comments on commit 7135750

Please sign in to comment.