Skip to content

Commit e42257e

Browse files
authored
Merge pull request #38542 from hamishknight/making-new-connections
2 parents c965f34 + 2d951ef commit e42257e

File tree

2 files changed

+48
-3
lines changed

2 files changed

+48
-3
lines changed

lib/Sema/CSGen.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,10 +2519,8 @@ namespace {
25192519
std::pair<bool, Expr *> walkToExprPre(Expr *expr) override {
25202520
// If there are any error expressions in this closure
25212521
// it wouldn't be possible to infer its type.
2522-
if (isa<ErrorExpr>(expr)) {
2522+
if (isa<ErrorExpr>(expr))
25232523
hasErrorExprs = true;
2524-
return {false, nullptr};
2525-
}
25262524

25272525
// Retrieve type variables from references to var decls.
25282526
if (auto *declRef = dyn_cast<DeclRefExpr>(expr)) {
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// RUN: %swift-ide-test --code-completion --source-filename %s --code-completion-token=CC
2+
3+
struct Listing {}
4+
5+
protocol View2 {}
6+
7+
extension View2 {
8+
@available(macOS 10.15, *)
9+
func onTapGesturf(perform action: () -> Void) -> some View2 { fatalError() }
10+
}
11+
12+
@resultBuilder struct ViewBuilder2 {
13+
static func buildBlock() -> Never { fatalError() }
14+
static func buildBlock<Content>(_ content: Content) -> Content where Content : View2 { fatalError() }
15+
}
16+
17+
struct HStack2<Content> : View2 {
18+
init(@ViewBuilder2 content: () -> Content) { fatalError() }
19+
}
20+
21+
struct ItemImage2 : View2 {
22+
init(path: String) {}
23+
}
24+
25+
struct ForEach2<Data, Content>: View2 {
26+
init(_ data: [Listing], @ViewBuilder2 content: (Data) -> Content) {}
27+
}
28+
29+
30+
struct TodayNookazonSection {
31+
32+
let listings: [Listing]
33+
34+
@available(macOS 10.15, *)
35+
@ViewBuilder2 var body: some View2 {
36+
ForEach2(listings) { listing in
37+
HStack2 {
38+
HStack2 {
39+
ItemImage2(path#^CC^#: "abc")
40+
}
41+
.onTapGesturf {
42+
listing
43+
}
44+
}
45+
}
46+
}
47+
}

0 commit comments

Comments
 (0)