Skip to content

Commit 3dd898f

Browse files
committed
[Constraint application] Don't recompute the type of the a member reference.
The constraint system tracks the type accurately and may (in the future) make adjustments to it; use that type directly rather than recomputing something that might be different.
1 parent 3e230d3 commit 3dd898f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/Sema/CSApply.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -845,10 +845,7 @@ namespace {
845845
// No substitutions required; the declaration reference is simple.
846846
containerTy = member->getDeclContext()->getDeclaredTypeOfContext();
847847
memberRef = member;
848-
auto baseDeclRefExpr = dyn_cast<DeclRefExpr>(base);
849-
refTy = tc.getUnopenedTypeOfReference(member, Type(), dc,
850-
baseDeclRefExpr,
851-
/*wantInterfaceType=*/true);
848+
refTy = openedFullType;
852849
}
853850

854851
// If we opened up an existential when referencing this member, update

0 commit comments

Comments
 (0)