File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -1277,8 +1277,10 @@ bool RValueTreatedAsLValueFailure::diagnoseAsError() {
1277
1277
ConstructorDecl::BodyInitKind::Delegating) {
1278
1278
emitDiagnostic (loc, diag::assignment_let_property_delegating_init,
1279
1279
member->getName ());
1280
- if (auto *ref = getResolvedMemberRef (member)) {
1281
- emitDiagnostic (ref, diag::decl_declared_here, ref->getFullName ());
1280
+ if (auto overload = getOverloadChoiceIfAvailable (
1281
+ getConstraintLocator (member, ConstraintLocator::Member))) {
1282
+ if (auto *ref = overload->choice .getDeclOrNull ())
1283
+ emitDiagnostic (ref, diag::decl_declared_here, ref->getFullName ());
1282
1284
}
1283
1285
return true ;
1284
1286
}
Original file line number Diff line number Diff line change @@ -153,13 +153,6 @@ class FailureDiagnostic {
153
153
return None;
154
154
}
155
155
156
- ValueDecl *getResolvedMemberRef (UnresolvedDotExpr *member) const {
157
- auto *locator = getConstraintLocator (member, ConstraintLocator::Member);
158
- if (auto overload = getOverloadChoiceIfAvailable (locator))
159
- return overload->choice .getDeclOrNull ();
160
- return nullptr ;
161
- }
162
-
163
156
// / Retrieve overload choice resolved for a given locator
164
157
// / by the constraint solver.
165
158
Optional<SelectedOverload>
You can’t perform that action at this time.
0 commit comments