Skip to content

Commit 3ac4cec

Browse files
author
Nathan Hawes
authored
Merge pull request #10393 from nathawes/rdar31960764-crash-at-first-non-whitespace-after-hash-if
[test] Add regression test for already fixed syntax coloring crash (rdar31960764)
2 parents e0f75bf + 6f9248f commit 3ac4cec

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: %target-swift-ide-test -syntax-coloring -source-filename %s | %FileCheck %s
2+
// RUN: %target-swift-ide-test -syntax-coloring -typecheck -source-filename %s | %FileCheck %s
3+
4+
// CHECK: <#kw>#if</#kw> <#id>d</#id>
5+
// CHECK-NEXT: <kw>func</kw> bar() {
6+
// CHECK-NEXT: <#kw>#if</#kw> <#id>d</#id>
7+
// CHECK-NEXT: }
8+
// CHECK-NEXT: <kw>func</kw> foo() {}
9+
10+
#if d
11+
func bar() {
12+
#if d
13+
}
14+
func foo() {}

0 commit comments

Comments
 (0)