Skip to content

Commit 2a2da1f

Browse files
committed
[Parse] Add FIXME for bad recovery for incomplete function type
1 parent e4c18ba commit 2a2da1f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/Parse/errors.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ func postRethrows2(_ f: () throws -> Int) -> rethrows Int { // expected-error{{'
122122
return try f()
123123
}
124124

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+
125132
// rdar://21328447
126133
func fixitThrow0() throw {} // expected-error{{expected throwing specifier; did you mean 'throws'?}} {{20-25=throws}}
127134
func fixitThrow1() throw -> Int {} // expected-error{{expected throwing specifier; did you mean 'throws'?}} {{20-25=throws}}

0 commit comments

Comments
 (0)