File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -13935,6 +13935,13 @@ ConstraintSystem::simplifyExplicitGenericArgumentsConstraint(
1393513935 } else {
1393613936 // If the overload hasn't been resolved, we can't simplify this constraint.
1393713937 auto overloadLocator = getCalleeLocator(getConstraintLocator(locator));
13938+
13939+ // If there was a problem resolving specialization expression
13940+ // it would be diagnosted as invalid AST node.
13941+ if (overloadLocator->directlyAt<ErrorExpr>()) {
13942+ return shouldAttemptFixes() ? SolutionKind::Error : SolutionKind::Solved;
13943+ }
13944+
1393813945 auto selectedOverload = findSelectedOverloadFor(overloadLocator);
1393913946 if (!selectedOverload)
1394013947 return formUnsolved();
Original file line number Diff line number Diff line change 1- // RUN: %target-typecheck-verify-swift -verify-ignore-unknown
1+ // RUN: %target-typecheck-verify-swift
22
33// rdar://139913219 - Make sure we don't crash.
44
55func bar( _ x: Int . Type , _: Int ) { }
66func bar< T> ( _ x: T . Type , _: Int ) { }
77
88func foo( ) {
9- // FIXME: We shouldn't be failing to produce a diagnostic.
10- // Once resolved, remove '-verify-ignore-unknown'
119 bar ( X< Int?> . self , . zero)
1210 // expected-error@-1 {{cannot find 'X' in scope}}
13- // expected-error@-2 {{failed to produce diagnostic for expression}}
1411}
You can’t perform that action at this time.
0 commit comments