Treat nested mock type aliases as inner (same as for mock classes).
This commit is contained in:
+4
-1
@@ -54,7 +54,7 @@ class NotFoundClasses(private val storageManager: StorageManager, private val mo
|
|||||||
private val typeAliases = storageManager.createMemoizedFunction<ClassRequest, TypeAliasDescriptor> { request ->
|
private val typeAliases = storageManager.createMemoizedFunction<ClassRequest, TypeAliasDescriptor> { request ->
|
||||||
computeClassifier(request, {
|
computeClassifier(request, {
|
||||||
owner, name, isInner, numberOfTypeParametersCount ->
|
owner, name, isInner, numberOfTypeParametersCount ->
|
||||||
MockTypeAliasDescriptor(storageManager, owner, name, numberOfTypeParametersCount)
|
MockTypeAliasDescriptor(storageManager, owner, name, isInner, numberOfTypeParametersCount)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,6 +115,7 @@ class NotFoundClasses(private val storageManager: StorageManager, private val mo
|
|||||||
storageManager: StorageManager,
|
storageManager: StorageManager,
|
||||||
containingDeclaration: DeclarationDescriptor,
|
containingDeclaration: DeclarationDescriptor,
|
||||||
name: Name,
|
name: Name,
|
||||||
|
private val isInner: Boolean,
|
||||||
numberOfDeclaredTypeParameters: Int
|
numberOfDeclaredTypeParameters: Int
|
||||||
) : AbstractTypeAliasDescriptor(containingDeclaration, Annotations.EMPTY, name, SourceElement.NO_SOURCE, Visibilities.PUBLIC) {
|
) : AbstractTypeAliasDescriptor(containingDeclaration, Annotations.EMPTY, name, SourceElement.NO_SOURCE, Visibilities.PUBLIC) {
|
||||||
init {
|
init {
|
||||||
@@ -136,6 +137,8 @@ class NotFoundClasses(private val storageManager: StorageManager, private val mo
|
|||||||
override val classDescriptor: ClassDescriptor?
|
override val classDescriptor: ClassDescriptor?
|
||||||
get() = expandedType.constructor.declarationDescriptor as? ClassDescriptor
|
get() = expandedType.constructor.declarationDescriptor as? ClassDescriptor
|
||||||
|
|
||||||
|
override fun isInner(): Boolean = isInner
|
||||||
|
|
||||||
override fun substitute(substitutor: TypeSubstitutor) = this
|
override fun substitute(substitutor: TypeSubstitutor) = this
|
||||||
|
|
||||||
override fun toString() = "MockTypeAliasDescriptor[$fqNameUnsafe]"
|
override fun toString() = "MockTypeAliasDescriptor[$fqNameUnsafe]"
|
||||||
|
|||||||
Reference in New Issue
Block a user