Make type aliases constructors return correct original descriptors
The problem was that when resolving super-calls we used known substitutor when creating a type alias constructor, thus its original return itself, while it's expected that it should return the descriptor before substitution The main idea of the fix that `createIfAvailable` should always return unsubstituted constructor. Note that known substitutor for type alias constructor should be based on abbreviation. The test change seems to be correct as PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE is already reported. Beside this, resolution behavior isn't expected to be changed dramatically
This commit is contained in:
Vendored
+6
-6
@@ -21,19 +21,19 @@ class Generic<T1> {
|
||||
open inner class Generic<T2>
|
||||
|
||||
inner class Test1 : GI<T1>()
|
||||
inner class Test2 : <!UNRESOLVED_REFERENCE, DEBUG_INFO_UNRESOLVED_WITH_TARGET!>GIInt<!>()
|
||||
inner class Test2 : <!TYPE_MISMATCH!>GIInt<!>()
|
||||
inner class Test3 : GIStar()
|
||||
inner class Test3a : test.Generic<*>.Inner()
|
||||
|
||||
inner class Test4<T2> : GG<T1, T2>()
|
||||
inner class Test5 : GG<T1, Int>()
|
||||
inner class Test6 : <!UNRESOLVED_REFERENCE, DEBUG_INFO_UNRESOLVED_WITH_TARGET!>GG<!><Int, T1>()
|
||||
inner class Test7 : <!UNRESOLVED_REFERENCE, DEBUG_INFO_UNRESOLVED_WITH_TARGET!>GG<!><Int, Int>()
|
||||
inner class Test8 : <!UNRESOLVED_REFERENCE, DEBUG_INFO_UNRESOLVED_WITH_TARGET!>GIntG<!><Int>()
|
||||
inner class Test9 : <!UNRESOLVED_REFERENCE, DEBUG_INFO_UNRESOLVED_WITH_TARGET!>GGInt<!><Int>()
|
||||
inner class Test6 : <!TYPE_MISMATCH!>GG<!><Int, T1>()
|
||||
inner class Test7 : <!TYPE_MISMATCH!>GG<!><Int, Int>()
|
||||
inner class Test8 : <!TYPE_MISMATCH!>GIntG<!><Int>()
|
||||
inner class Test9 : <!TYPE_MISMATCH!>GGInt<!><Int>()
|
||||
inner class Test10 : GGInt<T1>()
|
||||
|
||||
inner class Test11 : GG<T1, Int> {
|
||||
constructor() : super()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -13,4 +13,4 @@ class Test4 : CStar {
|
||||
constructor() : <!EXPANDED_TYPE_CANNOT_BE_CONSTRUCTED!>super<!>()
|
||||
}
|
||||
|
||||
class Test5 : <!EXPANDED_TYPE_CANNOT_BE_CONSTRUCTED!>CT<<!PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE!>*<!>>()<!>
|
||||
class Test5 : CT<<!PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE!>*<!>>()
|
||||
|
||||
Reference in New Issue
Block a user