Inner type aliases.

Type alias is considered "inner" if it captures outer class type parameters (implicitly or explicitly).
This commit is contained in:
Dmitry Petrov
2016-11-09 13:14:10 +03:00
parent 63fed20249
commit 718e8ebf9e
16 changed files with 244 additions and 27 deletions
@@ -133,6 +133,8 @@ class NotFoundClasses(private val storageManager: StorageManager, private val mo
get() = builtIns.nullableAnyType
override fun getDefaultType(): SimpleType =
builtIns.nullableAnyType
override val classDescriptor: ClassDescriptor?
get() = expandedType.constructor.declarationDescriptor as? ClassDescriptor
override fun substitute(substitutor: TypeSubstitutor) = this
@@ -169,6 +169,9 @@ class DeserializedTypeAliasDescriptor(
defaultTypeImpl = computeDefaultType()
}
override val classDescriptor: ClassDescriptor?
get() = if (expandedType.isError) null else expandedType.constructor.declarationDescriptor as? ClassDescriptor
override fun getDefaultType(): SimpleType =
defaultTypeImpl