File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1921,18 +1921,17 @@ namespace {
19211921 base->setImplicit ();
19221922 }
19231923
1924- const auto hasDynamicSelf =
1925- varDecl->getValueInterfaceType ()->hasDynamicSelfType ();
1924+ const auto hasDynamicSelf = refTy->hasDynamicSelfType ();
19261925
19271926 auto memberRefExpr
19281927 = new (ctx) MemberRefExpr (base, dotLoc, memberRef,
19291928 memberLoc, Implicit, semantics);
19301929 memberRefExpr->setIsSuper (isSuper);
19311930
19321931 if (hasDynamicSelf) {
1933- refTy = refTy->replaceCovariantResultType (containerTy, 1 );
1934- adjustedRefTy = adjustedRefTy->replaceCovariantResultType (
1935- containerTy, 1 );
1932+ refTy = refTy->replaceDynamicSelfType (containerTy);
1933+ adjustedRefTy = adjustedRefTy->replaceDynamicSelfType (
1934+ containerTy);
19361935 }
19371936
19381937 cs.setType (memberRefExpr, resultType (refTy));
You can’t perform that action at this time.
0 commit comments