Make ArchetypeType::NestedType its own proper type

with more explicit/semantic conversions in and out.

Using a PointerUnion with overlapping pointer types
is both error-prone and pretty close to illegible.

Swift SVN r24707
This commit is contained in:
John McCall
2015-01-24 13:05:38 +00:00
parent 0ac649d87b
commit 9e26ecf2af
13 changed files with 91 additions and 63 deletions

View File

@@ -454,8 +454,7 @@ namespace {
if (implArchetype->hasNestedType(member->getName())) {
nestedType = implArchetype->getNestedType(member->getName());
archetype = ArchetypeType::getNestedTypeValue(nestedType)
->getAs<ArchetypeType>();
archetype = nestedType.getValue()->getAs<ArchetypeType>();
} else if (implArchetype->isSelfDerived()) {
archetype = implArchetype;
}