IRGen: Fix emission of optional dynamic self type when bound to a generic argument

Fixes <rdar://problem/21081782>.

Swift SVN r30743
This commit is contained in:
Slava Pestov
2015-07-29 00:10:56 +00:00
parent 62bae87406
commit b52fafe1c2
2 changed files with 26 additions and 10 deletions

View File

@@ -449,7 +449,7 @@ TypeMetadataAccessStrategy irgen::getTypeMetadataAccessStrategy(CanType type) {
return TypeMetadataAccessStrategy::Direct;
// DynamicSelfType is actually local.
if (isa<DynamicSelfType>(type))
if (type->hasDynamicSelfType())
return TypeMetadataAccessStrategy::Direct;
// The zero-element tuple has special metadata in the runtime.