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 e4c18ba commit 2a2da1fCopy full SHA for 2a2da1f
test/Parse/errors.swift
@@ -122,6 +122,13 @@ func postRethrows2(_ f: () throws -> Int) -> rethrows Int { // expected-error{{'
122
return try f()
123
}
124
125
+func incompleteThrowType() {
126
+ // FIXME: Bad recovery for incomplete function type.
127
+ let _: () throws
128
+ // expected-error @-1 {{consecutive statements on a line must be separated by ';'}}
129
+ // expected-error @-2 {{expected expression}}
130
+}
131
+
132
// rdar://21328447
133
func fixitThrow0() throw {} // expected-error{{expected throwing specifier; did you mean 'throws'?}} {{20-25=throws}}
134
func fixitThrow1() throw -> Int {} // expected-error{{expected throwing specifier; did you mean 'throws'?}} {{20-25=throws}}
0 commit comments