File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1720,7 +1720,8 @@ namespace {
1720
1720
return forceUnwrapIfExpected (result, memberLocator);
1721
1721
}
1722
1722
1723
- if (member->getInterfaceType ()->hasDynamicSelfType ()) {
1723
+ auto *func = dyn_cast<FuncDecl>(member);
1724
+ if (func && func->getResultInterfaceType ()->hasDynamicSelfType ()) {
1724
1725
refTy = refTy->replaceCovariantResultType (containerTy, 2 );
1725
1726
adjustedRefTy = adjustedRefTy->replaceCovariantResultType (
1726
1727
containerTy, 2 );
Original file line number Diff line number Diff line change @@ -74,3 +74,10 @@ extension Generic where T == Never {
74
74
_ = Generic ( ) [ ]
75
75
}
76
76
}
77
+
78
+ final class Final {
79
+ static func useSelf( _ body: ( Self ) -> ( ) ) { }
80
+ }
81
+ func testNoErasure( _ body: ( Final ) -> ( ) ) {
82
+ return Final . useSelf ( body)
83
+ }
You can’t perform that action at this time.
0 commit comments