[FE 1.0] Skip improper constraints while determining READY_FOR_FIXATION_DECLARED_UPPER_BOUND_WITH_SELF_TYPES type variable readiness
^KT-51148 Fixed
This commit is contained in:
committed by
teamcity
parent
500295da68
commit
c25e07119c
+19
@@ -0,0 +1,19 @@
|
||||
fun box(): String {
|
||||
return <!INAPPLICABLE_CANDIDATE!>someFunction<!><<!CANNOT_INFER_PARAMETER_TYPE!>SomeEnum<!>>()
|
||||
}
|
||||
|
||||
interface SomeInterface <V> {
|
||||
|
||||
val value: V
|
||||
|
||||
}
|
||||
|
||||
enum class SomeEnum {
|
||||
|
||||
A, B, C
|
||||
|
||||
}
|
||||
|
||||
fun <V, T> someFunction(): String where T : Enum<T>, T : SomeInterface<V> {
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fun box(): String {
|
||||
return <!TYPE_MISMATCH!>someFunction<!><!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><SomeEnum><!>()
|
||||
}
|
||||
|
||||
interface SomeInterface <V> {
|
||||
|
||||
val value: V
|
||||
|
||||
}
|
||||
|
||||
enum class SomeEnum {
|
||||
|
||||
A, B, C
|
||||
|
||||
}
|
||||
|
||||
fun <V, T> someFunction(): String where T : Enum<T>, T : SomeInterface<V> {
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package
|
||||
|
||||
public fun box(): kotlin.String
|
||||
public fun </*0*/ V, /*1*/ T : kotlin.Enum<T>> someFunction(): kotlin.String where T : SomeInterface<V>
|
||||
|
||||
public final enum class SomeEnum : kotlin.Enum<SomeEnum> {
|
||||
enum entry A
|
||||
|
||||
enum entry B
|
||||
|
||||
enum entry C
|
||||
|
||||
private constructor SomeEnum()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: SomeEnum): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<SomeEnum!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): SomeEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<SomeEnum>
|
||||
}
|
||||
|
||||
public interface SomeInterface</*0*/ V> {
|
||||
public abstract val value: V
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user