File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -13935,6 +13935,13 @@ ConstraintSystem::simplifyExplicitGenericArgumentsConstraint(
13935
13935
} else {
13936
13936
// If the overload hasn't been resolved, we can't simplify this constraint.
13937
13937
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
+
13938
13945
auto selectedOverload = findSelectedOverloadFor(overloadLocator);
13939
13946
if (!selectedOverload)
13940
13947
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
2
2
3
3
// rdar://139913219 - Make sure we don't crash.
4
4
5
5
func bar( _ x: Int . Type , _: Int ) { }
6
6
func bar< T> ( _ x: T . Type , _: Int ) { }
7
7
8
8
func foo( ) {
9
- // FIXME: We shouldn't be failing to produce a diagnostic.
10
- // Once resolved, remove '-verify-ignore-unknown'
11
9
bar ( X< Int?> . self , . zero)
12
10
// expected-error@-1 {{cannot find 'X' in scope}}
13
- // expected-error@-2 {{failed to produce diagnostic for expression}}
14
11
}
You can’t perform that action at this time.
0 commit comments