Skip to content

Commit 3148ab8

Browse files
committed
---
yaml --- r: 349055 b: refs/heads/master c: 162f86f h: refs/heads/master i: 349053: ea929ad 349051: 95dfed6 349047: 7a2e379 349039: 2b2218b 349023: 5e9bffe 348991: b58d981 348927: 6164303
1 parent d50a099 commit 3148ab8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: cb54be26950bce9c135d6461a35f873399e1cb1b
2+
refs/heads/master: 162f86fdcc96c40bef6411c129f2c7dc6b9f0298
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/Sema/TypeCheckPropertyWrapper.cpp

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

103-
auto valueVarType = valueVar->getValueInterfaceType();
104-
105103
SmallVector<std::tuple<ConstructorDecl *, NonViableReason, Type>, 2>
106104
nonviable;
107105
SmallVector<ConstructorDecl *, 2> viableInitializers;
@@ -183,7 +181,7 @@ findSuitableWrapperInit(ASTContext &ctx, NominalTypeDecl *nominal,
183181

184182
// The parameter type must be the same as the type of `valueVar` or an
185183
// autoclosure thereof.
186-
if (!paramType->isEqual(valueVarType)) {
184+
if (!paramType->isEqual(valueVar->getValueInterfaceType())) {
187185
nonviable.push_back(std::make_tuple(
188186
init, NonViableReason::ParameterTypeMismatch, paramType));
189187
continue;
@@ -214,7 +212,8 @@ findSuitableWrapperInit(ASTContext &ctx, NominalTypeDecl *nominal,
214212

215213
case NonViableReason::ParameterTypeMismatch:
216214
init->diagnose(diag::property_wrapper_wrong_initial_value_init,
217-
init->getFullName(), paramType, valueVarType);
215+
init->getFullName(), paramType,
216+
valueVar->getValueInterfaceType());
218217
valueVar->diagnose(diag::decl_declared_here, valueVar->getFullName());
219218
break;
220219
}

0 commit comments

Comments
 (0)