mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Sema] fix lvalue-ness constrain
This commit is contained in:
@@ -2059,12 +2059,12 @@ ConstraintSystem::matchTypesBindTypeVar(
|
||||
type.visit([&](Type t) {
|
||||
if (auto *tvt = dyn_cast<TypeVariableType>(t.getPointer())) {
|
||||
if (!typeVar->getImpl().canBindToLValue()) {
|
||||
typeVar->getImpl().setCanBindToLValue(getSavedBindings(),
|
||||
/*enabled=*/false);
|
||||
tvt->getImpl().setCanBindToLValue(getSavedBindings(),
|
||||
/*enabled=*/false);
|
||||
}
|
||||
if (!typeVar->getImpl().canBindToNoEscape()) {
|
||||
typeVar->getImpl().setCanBindToNoEscape(getSavedBindings(),
|
||||
/*enabled=*/false);
|
||||
tvt->getImpl().setCanBindToNoEscape(getSavedBindings(),
|
||||
/*enabled=*/false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user