We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cccbc8 commit a65366eCopy full SHA for a65366e
test/expr/closure/inference.swift
@@ -38,3 +38,16 @@ var nestedClosuresWithBrokenInference = { f: Int in {} }
38
// expected-error@-2 {{consecutive statements on a line must be separated by ';'}} {{44-44=;}}
39
// expected-error@-3 {{expected expression}}
40
// expected-error@-4 {{use of unresolved identifier 'f'}}
41
+
42
+// SR-11540
43
44
+func SR11540<R>(action: () -> R) -> Void {}
45
46
+func SR11540<T, R>(action: (T) -> R) -> Void {}
47
48
+func SR11540_1<T, R>(action: (T) -> R) -> Void {}
49
50
+SR11540(action: { return }) // Ok SR11540<R>(action: () -> R) was the selected overload.
51
52
+// In case that's the only possible overload, it's acceptable
53
+SR11540_1(action: { return }) // OK
0 commit comments