Skip to content

Commit 0a79ab7

Browse files
committed
[IDE] Add test case for SR-14708
SR-14708 is no longer happening in the stress tester. Add its test case to the test suite. rdar://78781625
1 parent 5b7e375 commit 0a79ab7

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// RUN: %target-swift-ide-test --code-completion --source-filename %s --code-completion-token=COMPLETE | %FileCheck %s
2+
3+
protocol View2 {}
4+
5+
extension Never : View2 {}
6+
7+
struct Text2: View2 {}
8+
9+
@resultBuilder struct ViewBuilder2 {
10+
static func buildBlock() -> Never { fatalError() }
11+
static func buildBlock<Content>(_ content: Content) -> Content where Content : View2 { fatalError() }
12+
}
13+
14+
struct MysteryIsland2 {
15+
let chance: Int = 2
16+
}
17+
18+
struct VStack2<Content> : View2 where Content : View2 {
19+
init(@ViewBuilder2 content: () -> Content) { fatalError() }
20+
}
21+
22+
struct MysteryIslandDetail {
23+
let island: MysteryIsland2
24+
25+
@ViewBuilder2 var body: some View2 {
26+
let b = "\(island.#^COMPLETE^#chance)"
27+
VStack2() {}
28+
}
29+
}
30+
31+
// CHECK: Begin completions, 2 items
32+
// CHECK-DAG: Keyword[self]/CurrNominal: self[#MysteryIsland2#]; name=self
33+
// CHECK-DAG: Decl[InstanceVar]/CurrNominal/TypeRelation[Convertible]: chance[#Int#]; name=chance
34+
// CHECK: End completions

0 commit comments

Comments
 (0)