mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #79662 from swiftlang/gaborh/dynamic-self-frt
[cxx-interop] Interpret Self as a static shorthand for FRTs
This commit is contained in:
@@ -709,7 +709,8 @@ Expr *TypeChecker::resolveDeclRefExpr(UnresolvedDeclRefExpr *UDRE,
|
||||
if (DeclContext *typeContext = DC->getInnermostTypeContext()){
|
||||
Type SelfType = typeContext->getSelfInterfaceType();
|
||||
|
||||
if (typeContext->getSelfClassDecl())
|
||||
if (typeContext->getSelfClassDecl() &&
|
||||
!typeContext->getSelfClassDecl()->isForeignReferenceType())
|
||||
SelfType = DynamicSelfType::get(SelfType, Context);
|
||||
return new (Context)
|
||||
TypeExpr(new (Context) SelfTypeRepr(SelfType, Loc));
|
||||
|
||||
Reference in New Issue
Block a user