SILGen: Allow static stored properties in fully-concrete extensions of generic types.

There's no need for per-instantiation storage in this case, so we can relax the implementation limitation for them.
This commit is contained in:
Joe Groff
2017-02-24 14:55:56 -08:00
parent 73b1df31f5
commit 886c83f6e7
6 changed files with 39 additions and 17 deletions

View File

@@ -594,7 +594,8 @@ void SILGenModule::preEmitFunction(SILDeclRef constant,
assert(F->empty() && "already emitted function?!");
F->setGenericEnvironment(Types.getConstantInfo(constant).GenericEnv);
if (F->getLoweredFunctionType()->isPolymorphic())
F->setGenericEnvironment(Types.getConstantInfo(constant).GenericEnv);
// Create a debug scope for the function using astNode as source location.
F->setDebugScope(new (M) SILDebugScope(Loc, F));