Choose Java field during overload resolution with a pure Kotlin property
^KT-31244 Fixed
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
// SKIP_TXT
|
||||
// !CHECK_TYPE
|
||||
|
||||
// FILE: CompressionType.java
|
||||
public enum CompressionType {
|
||||
ZIP(1.0);
|
||||
public final double name;
|
||||
CompressionType(double name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: CollectionWithSize.java
|
||||
public abstract class CollectionWithSize implements java.util.Collection<String> {
|
||||
public final String size = "";
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun main(c: CollectionWithSize) {
|
||||
CompressionType.ZIP.<!OVERLOAD_RESOLUTION_AMBIGUITY!>name<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Double>() }
|
||||
c.<!OVERLOAD_RESOLUTION_AMBIGUITY!>size<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><String>() }
|
||||
|
||||
CompressionType.ZIP::<!OVERLOAD_RESOLUTION_AMBIGUITY!>name<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><kotlin.reflect.KProperty0<Double>>() }
|
||||
c::<!OVERLOAD_RESOLUTION_AMBIGUITY!>size<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><kotlin.reflect.KProperty0<String>>() }
|
||||
}
|
||||
Reference in New Issue
Block a user