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 {
17201720 return forceUnwrapIfExpected (result, memberLocator);
17211721 }
17221722
1723- if (member->getInterfaceType ()->hasDynamicSelfType ()) {
1723+ auto *func = dyn_cast<FuncDecl>(member);
1724+ if (func && func->getResultInterfaceType ()->hasDynamicSelfType ()) {
17241725 refTy = refTy->replaceCovariantResultType (containerTy, 2 );
17251726 adjustedRefTy = adjustedRefTy->replaceCovariantResultType (
17261727 containerTy, 2 );
Original file line number Diff line number Diff line change @@ -74,3 +74,10 @@ extension Generic where T == Never {
7474 _ = Generic ( ) [ ]
7575 }
7676}
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