KT-43217 Encode @EnhancedNullability types in IdSignature

This commit is contained in:
Dmitry Petrov
2020-11-09 08:37:00 +03:00
parent f6df624c6b
commit b9c6267a63
21 changed files with 470 additions and 2 deletions
+46
View File
@@ -0,0 +1,46 @@
// FILE: kt43217.kt
class A {
private val b =
object : DoubleExpression() {
override fun get(): Double {
return 0.0
}
}
}
class C : DoubleExpression() {
override fun get() = 0.0
}
// FILE: DoubleExpression.java
import org.jetbrains.annotations.NotNull;
public abstract class DoubleExpression implements ObservableDouble {
@NotNull
@Override
public Object isEqualTo(double value) {
return null;
}
}
// FILE: ObservableValue.java
import org.jetbrains.annotations.NotNull;
public interface ObservableValue<T> {
@NotNull
T get();
@NotNull
default Object isEqualTo(@NotNull T value) {
return null;
}
}
// FILE: ObservableDouble.java
import org.jetbrains.annotations.NotNull;
public interface ObservableDouble extends ObservableValue<Double> {
@NotNull
Object isEqualTo(double value);
}
+25
View File
@@ -0,0 +1,25 @@
@kotlin.Metadata
public final class A$b$1 {
// source: 'kt43217.kt'
enclosing method A.<init>()V
inner (anonymous) class A$b$1
method <init>(): void
public @org.jetbrains.annotations.NotNull method get(): java.lang.Double
public synthetic bridge method get(): java.lang.Object
}
@kotlin.Metadata
public final class A {
// source: 'kt43217.kt'
private final field b: A$b$1
inner (anonymous) class A$b$1
public method <init>(): void
}
@kotlin.Metadata
public final class C {
// source: 'kt43217.kt'
public method <init>(): void
public @org.jetbrains.annotations.NotNull method get(): java.lang.Double
public synthetic bridge method get(): java.lang.Object
}
@@ -0,0 +1,25 @@
@kotlin.Metadata
public final class A$b$1 {
// source: 'kt43217.kt'
enclosing method A.<init>()V
inner (anonymous) class A$b$1
method <init>(): void
public @org.jetbrains.annotations.NotNull method get(): java.lang.Double
public synthetic bridge method get(): java.lang.Object
}
@kotlin.Metadata
public final class A {
// source: 'kt43217.kt'
private final @org.jetbrains.annotations.NotNull field b: A$b$1
inner (anonymous) class A$b$1
public method <init>(): void
}
@kotlin.Metadata
public final class C {
// source: 'kt43217.kt'
public method <init>(): void
public @org.jetbrains.annotations.NotNull method get(): java.lang.Double
public synthetic bridge method get(): java.lang.Object
}