From d3fe40127cc7ca083e53bbc1e956a3ae101f1551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 15 Jun 2019 04:44:16 +0200 Subject: [PATCH] Forget SR-1570 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f67b49934..d9d4f0f69 100644 --- a/README.md +++ b/README.md @@ -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: