Skip to content

Commit f0accb0

Browse files
author
Nathan Hawes
committed
[test] Cover a few more function builder cases in test/IDE/complete_ambiguous.swift (NFC)
1 parent bb77323 commit f0accb0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/IDE/complete_ambiguous.swift

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLOSURE_NORETURN | %FileCheck %s --check-prefix=POINT_MEMBER
1111
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLOSURE_FUNCBUILDER | %FileCheck %s --check-prefix=POINT_MEMBER
1212
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MULTICLOSURE_FUNCBUILDER | %FileCheck %s --check-prefix=POINT_MEMBER
13+
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MULTICLOSURE_FUNCBUILDER_ERROR | %FileCheck %s --check-prefix=POINT_MEMBER
14+
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MULTICLOSURE_FUNCBUILDER_FIXME | %FileCheck %s --check-prefix=NORESULTS
1315

1416
struct A {
1517
func doAThings() -> A { return self }
@@ -145,3 +147,25 @@ CreateThings {
145147
Thing { _ in }
146148
}
147149

150+
// In multi-statement closure with unpropagated errors
151+
CreateThings {
152+
Thing { point in
153+
print("hello")
154+
point. // ErrorExpr
155+
point.#^MULTICLOSURE_FUNCBUILDER_ERROR^#
156+
}
157+
Thing { point in
158+
print("hello")
159+
point. // ErrorExpr
160+
}
161+
}
162+
163+
// FIXME: No results in multi-statement closure with erroreous sibling function builder element
164+
CreateThings {
165+
Thing { point in
166+
print("hello")
167+
point.#^MULTICLOSURE_FUNCBUILDER_FIXME^#
168+
}
169+
Thing. // ErrorExpr
170+
}
171+

0 commit comments

Comments
 (0)