File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -1991,12 +1991,9 @@ namespace {
1991
1991
// tuples, nested arrays, and dictionary literals.
1992
1992
//
1993
1993
// Otherwise, create a new type variable.
1994
- auto boundExpr = locator.trySimplifyToExpr ();
1995
-
1996
- if (boundExpr) {
1997
- auto boundExprTy = CS.getType (boundExpr);
1998
- if (!boundExprTy->is <InOutType>())
1999
- return boundExprTy->getRValueType ();
1994
+ if (auto boundExpr = locator.trySimplifyToExpr ()) {
1995
+ if (!boundExpr->isSemanticallyInOutExpr ())
1996
+ return CS.getType (boundExpr)->getRValueType ();
2000
1997
}
2001
1998
2002
1999
return CS.createTypeVariable (CS.getConstraintLocator (locator),
@@ -2022,9 +2019,8 @@ namespace {
2022
2019
case ReferenceOwnership::Unmanaged:
2023
2020
if (!var->hasNonPatternBindingInit ()) {
2024
2021
if (auto boundExpr = locator.trySimplifyToExpr ()) {
2025
- auto boundExprTy = CS.getType (boundExpr);
2026
- if (!boundExprTy->is <InOutType>())
2027
- return boundExprTy->getRValueType ();
2022
+ if (!boundExpr->isSemanticallyInOutExpr ())
2023
+ return CS.getType (boundExpr)->getRValueType ();
2028
2024
}
2029
2025
}
2030
2026
break ;
You can’t perform that action at this time.
0 commit comments