Skip to content

Commit 0af9a28

Browse files
committed
[Diagnostics] Allow property wrapper fixes to be diagnosed as ambiguity
1 parent 3ebf633 commit 0af9a28

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Sema/CSFix.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,10 @@ class UsePropertyWrapper final : public ConstraintFix {
804804

805805
bool diagnose(const Solution &solution, bool asNote = false) const override;
806806

807+
bool diagnoseForAmbiguity(CommonFixesArray commonFixes) const override {
808+
return diagnose(*commonFixes.front().first);
809+
}
810+
807811
static UsePropertyWrapper *create(ConstraintSystem &cs, VarDecl *wrapped,
808812
bool usingStorageWrapper, Type base,
809813
Type wrapper, ConstraintLocator *locator);
@@ -831,6 +835,10 @@ class UseWrappedValue final : public ConstraintFix {
831835

832836
bool diagnose(const Solution &solution, bool asNote = false) const override;
833837

838+
bool diagnoseForAmbiguity(CommonFixesArray commonFixes) const override {
839+
return diagnose(*commonFixes.front().first);
840+
}
841+
834842
static UseWrappedValue *create(ConstraintSystem &cs, VarDecl *propertyWrapper,
835843
Type base, Type wrapper,
836844
ConstraintLocator *locator);

0 commit comments

Comments
 (0)