Skip to content

Commit cb54be2

Browse files
committed
[PropertyWrappers] Re-introduce valueVarType which got removed while fixing merge conflict
1 parent e23b373 commit cb54be2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Sema/TypeCheckPropertyWrapper.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ findSuitableWrapperInit(ASTContext &ctx, NominalTypeDecl *nominal,
100100
Inaccessible,
101101
};
102102

103+
auto valueVarType = valueVar->getValueInterfaceType();
104+
103105
SmallVector<std::tuple<ConstructorDecl *, NonViableReason, Type>, 2>
104106
nonviable;
105107
SmallVector<ConstructorDecl *, 2> viableInitializers;
@@ -212,8 +214,7 @@ findSuitableWrapperInit(ASTContext &ctx, NominalTypeDecl *nominal,
212214

213215
case NonViableReason::ParameterTypeMismatch:
214216
init->diagnose(diag::property_wrapper_wrong_initial_value_init,
215-
init->getFullName(), paramType,
216-
valueVar->getValueInterfaceType());
217+
init->getFullName(), paramType, valueVarType);
217218
valueVar->diagnose(diag::decl_declared_here, valueVar->getFullName());
218219
break;
219220
}

0 commit comments

Comments
 (0)