Skip to content

Commit 7e758f5

Browse files
committed
test: add a syntax parser test to ensure we don't diagnose disabled var
1 parent eaa0424 commit 7e758f5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/Syntax/Parser/diags.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@ if (5 ‒ 5) == 0 {}
2525
// CHECK-NEXT: ([[@LINE-4]]:7,[[@LINE-4]]:10) Fixit: "-"
2626
// CHECK-NEXT: [[@LINE-5]]:11 Error: expected ',' separator
2727
// CHECK-NEXT: ([[@LINE-6]]:6,[[@LINE-6]]:6) Fixit: ","
28+
29+
let dateFormatter: DateFormatter = {
30+
let dateFormatter = DateFormatter()
31+
return dateFormatter
32+
}()
33+
2834
// CHECK-NEXT: 7 error(s) 0 warnings(s) 2 note(s)

0 commit comments

Comments
 (0)