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

@@ -1735,11 +1735,6 @@ void LValue::addMemberVarComponent(SILGenFunction &gen, SILLocation loc,
// FIXME: This has to be dynamically looked up for classes, and
// dynamically instantiated for generics.
if (strategy == AccessStrategy::Storage && var->isStatic()) {
auto baseMeta = baseFormalType->castTo<MetatypeType>()->getInstanceType();
(void)baseMeta;
assert(!baseMeta->is<BoundGenericType>() &&
"generic static stored properties not implemented");
// FIXME: this implicitly drops the earlier components, but maybe
// we ought to evaluate them for side-effects even during the
// formal access?