AST: Static properties of fixed-layout types are resilient

We don't want @_fixed_layout to apply to static properties, or you
get fun consequences like not being able to change static stored
properties defined in extensions of imported types to computed.
This commit is contained in:
Slava Pestov
2018-01-20 21:22:58 -08:00
parent 834a121b10
commit 8f9f7afc55
7 changed files with 117 additions and 21 deletions

View File

@@ -276,9 +276,8 @@ static void maybeMarkTransparent(FuncDecl *accessor,
if (!nominalDecl)
return;
// Accessors for stored properties of resilient types are not
// @_transparent.
if (nominalDecl->isResilient())
// Accessors for resilient properties are not @_transparent.
if (storage->isResilient())
return;
// Accessors for protocol storage requirements are never @_transparent