We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is
1 parent 70eeccb commit d21c280Copy full SHA for d21c280
lib/Sema/CSGen.cpp
@@ -2768,8 +2768,9 @@ namespace {
2768
// correct handling of patterns like `_ as Foo` where `_` would
2769
// get a type of `Foo` but `is` pattern enclosing it could still be
2770
// inferred from enclosing context.
2771
- auto isType = CS.createTypeVariable(CS.getConstraintLocator(pattern),
2772
- TVO_CanBindToNoEscape);
+ auto isType =
+ CS.createTypeVariable(CS.getConstraintLocator(pattern),
2773
+ TVO_CanBindToNoEscape | TVO_CanBindToHole);
2774
CS.addConstraint(
2775
ConstraintKind::Conversion, subPatternType, isType,
2776
locator.withPathElement(LocatorPathElt::PatternMatch(pattern)));
0 commit comments