Skip to content

Commit b7519fa

Browse files
committed
[CS] Add IgnoreInvalidASTNode fix for invalid generic argument
Make sure we record a fix here to ensure we don't try to do CSApply with holes.
1 parent 99e9ed8 commit b7519fa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/Sema/CSGen.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,8 @@ namespace {
19811981
/*preparedOverload*/ nullptr));
19821982
if (result->hasError()) {
19831983
auto &ctxt = CS.getASTContext();
1984+
CS.recordFix(IgnoreInvalidASTNode::create(
1985+
CS, CS.getConstraintLocator(argLocator)));
19841986
result = PlaceholderType::get(ctxt, specializationArg);
19851987
ctxt.Diags.diagnose(lAngleLoc,
19861988
diag::while_parsing_as_left_angle_bracket);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"kind":"typecheck","signature":"swift::constraints::SolverTrail::~SolverTrail()","signatureAssert":"Assertion failed: (Changes.empty() && \"Trail corrupted\"), function ~SolverTrail"}
2-
// RUN: not --crash %target-swift-frontend -typecheck %s
2+
// RUN: not %target-swift-frontend -typecheck %s
33
enum a< b { case c(}
44
func d< b >(b->a< b >) d(a< e >.c let a

0 commit comments

Comments
 (0)