Skip to content

Commit 65c8334

Browse files
committed
[GSB] Hack: self-derived sources are showing up very late; ignore them.
There's a more pervasive issue here that needs further study; essentially, we can end up with self-derived sources getting reinjected later, and will either need to avoid that reinjection or need to expand what this localized hack does, filtering out self-derived constraints when we enumerate requirements.
1 parent 5eebd08 commit 65c8334

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4211,6 +4211,15 @@ static void computeDerivedSameTypeComponents(
42114211
assert(componentOf.count(concrete.archetype) > 0);
42124212
auto &component = components[componentOf[concrete.archetype]];
42134213

4214+
// FIXME: Skip self-derived sources. This means our attempts to "stage"
4215+
// construction of self-derived sources really don't work, because we
4216+
// discover more information later, so we need a more on-line or
4217+
// iterative approach.
4218+
bool derivedViaConcrete;
4219+
if (concrete.source->isSelfDerivedSource(concrete.archetype,
4220+
derivedViaConcrete))
4221+
continue;
4222+
42144223
// If it has a better source than we'd seen before for this component,
42154224
// keep it.
42164225
auto &bestConcreteTypeSource = component.concreteTypeSource;

0 commit comments

Comments
 (0)