FIR: Support enhanced types when checking if Java type is primitive
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: Box.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class Box<T> {
|
||||
public void put(@NotNull T t) {}
|
||||
}
|
||||
|
||||
// FILE: IntBox.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class IntBox extends Box<Integer> {
|
||||
public int result = 0;
|
||||
@Override
|
||||
public void put(@NotNull Integer t) {
|
||||
result = t;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun main() {
|
||||
IntBox().put(1)
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public open class Box</*0*/ T : kotlin.Any!> {
|
||||
public constructor Box</*0*/ T : kotlin.Any!>()
|
||||
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 fun put(/*0*/ @org.jetbrains.annotations.NotNull t: T!!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class IntBox : Box<kotlin.Int!> {
|
||||
public constructor IntBox()
|
||||
public final var result: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@java.lang.Override public open override /*1*/ fun put(/*0*/ @org.jetbrains.annotations.NotNull t: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
// FILE: A.java
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
public class A {
|
||||
public void foo(int x) {}
|
||||
public void bar(@NotNull Double x) {}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import org.jetbrains.annotations.*;
|
||||
public class B extends A {
|
||||
public void foo(@NotNull Integer x) {}
|
||||
public void bar(double x) {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun foo(b: B) {
|
||||
// See KT-9182
|
||||
b.<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1)
|
||||
b.bar(2.0)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: A.java
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user