Skip to content

Commit d2f5e63

Browse files
committed
[TypeChecker] NFC: Add test-case for rdar://problem/65983237
1 parent dadf2b4 commit d2f5e63

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/Constraints/function_builder_diags.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,14 @@ struct MyView {
619619
} // expected-error {{expected identifier after '.' expression}}
620620
}
621621

622+
@TupleBuilder var invalidCaseWithoutDot: some P {
623+
switch Optional.some(1) {
624+
case none: 42 // expected-error {{cannot find 'none' in scope}}
625+
case .some(let x):
626+
0
627+
}
628+
}
629+
622630
@TupleBuilder var invalidConversion: Int { // expected-error {{cannot convert value of type 'String' to specified type 'Int'}}
623631
""
624632
}

0 commit comments

Comments
 (0)