mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user