File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1868,11 +1868,14 @@ TypeVariableType *ConstraintSystem::openGenericParameter(
1868
1868
auto *paramLocator = getConstraintLocator (
1869
1869
locator.withPathElement (LocatorPathElt::GenericParameter (parameter)));
1870
1870
1871
- unsigned options = ( TVO_PrefersSubtypeBinding |
1872
- TVO_CanBindToHole);
1871
+ unsigned options = TVO_PrefersSubtypeBinding;
1872
+
1873
1873
if (parameter->isParameterPack ())
1874
1874
options |= TVO_CanBindToPack;
1875
1875
1876
+ if (shouldAttemptFixes ())
1877
+ options |= TVO_CanBindToHole;
1878
+
1876
1879
auto typeVar = createTypeVariable (paramLocator, options);
1877
1880
auto result = replacements.insert (std::make_pair (
1878
1881
cast<GenericTypeParamType>(parameter->getCanonicalType ()), typeVar));
You can’t perform that action at this time.
0 commit comments