Do not check bounds in type alias expansion if checkBounds is false
This happens when we resolve bounds for type parameters, causing wrong UPPER_BOUND_VIOLATED to be reported on type parameter whose bounds were not resolved yet. #KT-19601 Fixed Target versions 1.1.5
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
interface Order<T>
|
||||
|
||||
typealias Ord<T> = Order<T>
|
||||
|
||||
class Test1<T1 : Ord<T1>>
|
||||
|
||||
interface Num<T : Number>
|
||||
|
||||
typealias N<T> = Num<T>
|
||||
|
||||
class Test2<T : N<<!UPPER_BOUND_VIOLATED!>String<!>>>
|
||||
@@ -0,0 +1,29 @@
|
||||
package
|
||||
|
||||
public interface Num</*0*/ T : kotlin.Number> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface Order</*0*/ T> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Test1</*0*/ T1 : Ord<T1> /* = Order<T1> */> {
|
||||
public constructor Test1</*0*/ T1 : Ord<T1> /* = Order<T1> */>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Test2</*0*/ T : N<kotlin.String> /* = Num<kotlin.String> */> {
|
||||
public constructor Test2</*0*/ T : N<kotlin.String> /* = Num<kotlin.String> */>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
public typealias N</*0*/ T> = Num<T>
|
||||
public typealias Ord</*0*/ T> = Order<T>
|
||||
Reference in New Issue
Block a user