Introduce initial version of FIR Java type enhancement
Java type enhancement is performed by a special scope kind Java FIR dump was added for multiplatform tests to look at enhancements Overrides, J2K mapping, special cases does not work yet Related to KT-29937
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
public open class Annotated : R|java/lang/Object| {
|
||||
@R|org/jetbrains/annotations/NotNull|() public open operator function foo(@R|org/jetbrains/annotations/Nullable|() param: R|ft<java/lang/String?, java/lang/String?>|?): R|ft<java/lang/String, java/lang/String>|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class Annotated {
|
||||
@NotNull
|
||||
public String foo(@Nullable String param) {
|
||||
if (param != null) return param;
|
||||
else return "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class User : Annotated() {
|
||||
fun test() {
|
||||
val x = foo("123")
|
||||
val y = foo(null)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
FILE: jvm.kt
|
||||
public final class User : R|Annotated| {
|
||||
public constructor(): super<R|Annotated|>()
|
||||
|
||||
public final function test(): R|kotlin/Unit| {
|
||||
val x: R|error: Not supported: FirImplicitTypeRefImpl| = R|/Annotated.foo|(String(123))
|
||||
val y: R|error: Not supported: FirImplicitTypeRefImpl| = R|/Annotated.foo|(Null(null))
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user