File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
validation-test/compiler_crashers_2_fixed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -3229,7 +3229,7 @@ class ExprAvailabilityWalker : public ASTWalker {
32293229 maybeDiagParameterizedExistentialErasure (EE, Where);
32303230 }
32313231 if (auto *CC = dyn_cast<ExplicitCastExpr>(E)) {
3232- if (!isa<CoerceExpr>(CC) &&
3232+ if (!isa<CoerceExpr>(CC) && CC-> getCastType () &&
32333233 CC->getCastType ()->hasParameterizedExistential ()) {
32343234 SourceLoc loc = CC->getCastTypeRepr () ? CC->getCastTypeRepr ()->getLoc ()
32353235 : E->getLoc ();
Original file line number Diff line number Diff line change 1+ // RUN: %target-typecheck-verify-swift
2+
3+ @resultBuilder
4+ struct ViewBuilder {
5+ static func buildBlock( _ x: Int ) -> Int { x }
6+ }
7+
8+ func test( _: ( ) -> Void ) -> Int {
9+ return 42
10+ }
11+
12+ struct MyView {
13+ @ViewBuilder var body : Int {
14+ test {
15+ " ab " is Unknown // expected-error{{cannot find type 'Unknown' in scope}}
16+ print ( " x " )
17+ }
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments