Forget SR-1570

This commit is contained in:
Gwendal Roué committed 2019-06-15 04:44:16 +02:00
1 parent 3f9b94f95e
commit d3fe40127c
1 file changed
+2 -2
+2 -2
View File
@@ -8892,13 +8892,13 @@ You may get this error when using the `read` and `write` methods of database que
```swift
// Generic parameter 'T' could not be inferred
let x = try dbQueue.read { db in
let string = try dbQueue.read { db in
let result = try String.fetchOne(db, ...)
return result
}
```
This is a Swift compiler issue (see [SR-1570](https://bugs.swift.org/browse/SR-1570)).
This is a limitation of the Swift compiler.
The general workaround is to explicitly declare the type of the closure result: