SIL: Accessors synthesized on-demand are serialized when visible outside the module

Second part of <https://bugs.swift.org/browse/SR-8657> /
<rdar://problem/43951732>.
This commit is contained in:
Slava Pestov
2018-09-06 13:02:09 -07:00
parent 0503e5a1ac
commit ec804a2d01
4 changed files with 38 additions and 7 deletions

View File

@@ -337,6 +337,10 @@ static void maybeMarkTransparent(TypeChecker &TC, AccessorDecl *accessor) {
if (classDecl->checkObjCAncestry() != ObjCClassKind::NonObjC)
return;
// Accessors synthesized on-demand are never transaprent.
if (accessor->hasForcedStaticDispatch())
return;
accessor->getAttrs().add(new (TC.Context) TransparentAttr(IsImplicit));
}