[JVM IR] Use error types in KAPT mode for unresolved delegate types.

^KT-57388 Fixed
This commit is contained in:
Mads Ager
2023-03-21 15:28:00 +01:00
committed by Alexander Udalov
parent 5a6e896b45
commit a525983e38
11 changed files with 259 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
@kotlin.Metadata
public final class User {
// source: 'dataClass.kt'
private final field age: int
private final @org.jetbrains.annotations.NotNull field name: java.lang.String
public method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String, p1: int): void
public final @org.jetbrains.annotations.NotNull method component1(): java.lang.String
public final method component2(): int
public final @org.jetbrains.annotations.NotNull method copy(@org.jetbrains.annotations.NotNull p0: java.lang.String, p1: int): User
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
public final method getAge(): int
public final @org.jetbrains.annotations.NotNull method getName(): java.lang.String
public method hashCode(): int
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
}
+30
View File
@@ -0,0 +1,30 @@
@kotlin.Metadata
@kotlin.Suppress(names=["UNRESOLVED_REFERENCE"])
public final class A {
// source: 'errorTypes.kt'
private final @org.jetbrains.annotations.NotNull field a: error.NonExistentClass
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getA(): error.NonExistentClass
}
@kotlin.Metadata
@kotlin.Suppress(names=["UNRESOLVED_REFERENCE"])
public final class B {
// source: 'errorTypes.kt'
private final @org.jetbrains.annotations.NotNull field a$delegate: error.NonExistentClass
public method <init>(): void
public synthetic deprecated static @kotlin.Suppress(names=["UNRESOLVED_REFERENCE_WRONG_RECEIVER"]) method getA$annotations(): void
public final @org.jetbrains.annotations.NotNull method getA(): java.lang.String
}
@kotlin.Metadata
public class C {
// source: 'errorTypes.kt'
public method <init>(): void
}
@kotlin.Metadata
public final class ErrorTypesKt {
// source: 'errorTypes.kt'
public final static @org.jetbrains.annotations.NotNull method flaf(@org.jetbrains.annotations.NotNull p0: C): java.lang.String
}
+11 -1
View File
@@ -1,4 +1,14 @@
@Suppress("UNRESOLVED_REFERENCE")
class A {
val a: ABC = null
}
}
open class C
@Suppress("UNRESOLVED_REFERENCE")
class B : NonExisting {
@Suppress("UNRESOLVED_REFERENCE_WRONG_RECEIVER")
val a: String by flaf()
}
fun C.flaf() = "OK"
+23
View File
@@ -6,3 +6,26 @@ public final class A {
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getA(): error.NonExistentClass
}
@kotlin.Metadata
@kotlin.Suppress(names=["UNRESOLVED_REFERENCE"])
public final class B {
// source: 'errorTypes.kt'
synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final @org.jetbrains.annotations.NotNull field a$delegate: error.NonExistentClass
public method <init>(): void
public synthetic deprecated static @kotlin.Suppress(names=["UNRESOLVED_REFERENCE_WRONG_RECEIVER"]) method getA$annotations(): void
public final @org.jetbrains.annotations.NotNull method getA(): java.lang.String
}
@kotlin.Metadata
public class C {
// source: 'errorTypes.kt'
public method <init>(): void
}
@kotlin.Metadata
public final class ErrorTypesKt {
// source: 'errorTypes.kt'
public final static @org.jetbrains.annotations.NotNull method flaf(@org.jetbrains.annotations.NotNull p0: C): java.lang.String
}
+61
View File
@@ -0,0 +1,61 @@
@kotlin.Metadata
public final class test/TopLevel$Companion {
// source: 'innerClasses.kt'
private method <init>(): void
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
public final method a(): void
public synthetic deprecated static @kotlin.jvm.JvmStatic method getQ$annotations(): void
public final @org.jetbrains.annotations.NotNull method getQ(): java.lang.String
public final inner class test/TopLevel$Companion
}
@kotlin.Metadata
public interface test/TopLevel$InnerInterface {
// source: 'innerClasses.kt'
public inner class test/TopLevel$InnerInterface
}
@kotlin.Metadata
public final class test/TopLevel$InnerObject {
// source: 'innerClasses.kt'
public final static @org.jetbrains.annotations.NotNull field INSTANCE: test.TopLevel$InnerObject
static method <clinit>(): void
private method <init>(): void
public final inner class test/TopLevel$InnerObject
}
@kotlin.Metadata
public final class test/TopLevel$NestedClass$NestedInnerClass {
// source: 'innerClasses.kt'
synthetic final field this$0: test.TopLevel$NestedClass
public method <init>(p0: test.TopLevel$NestedClass): void
public final inner class test/TopLevel$NestedClass
public final inner class test/TopLevel$NestedClass$NestedInnerClass
}
@kotlin.Metadata
public final class test/TopLevel$NestedClass {
// source: 'innerClasses.kt'
public method <init>(): void
public final inner class test/TopLevel$NestedClass
public final inner class test/TopLevel$NestedClass$NestedInnerClass
}
@kotlin.Metadata
public final class test/TopLevel {
// source: 'innerClasses.kt'
public final static @org.jetbrains.annotations.NotNull field Companion: test.TopLevel$Companion
private final static @org.jetbrains.annotations.NotNull field q: java.lang.String
private final @org.jetbrains.annotations.NotNull field x: java.lang.String
private final field y: int
static method <clinit>(): void
public method <init>(): void
public final method b(): void
public final static @org.jetbrains.annotations.NotNull method getQ(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getX(): java.lang.String
public final method getY(): int
public final inner class test/TopLevel$Companion
public final inner class test/TopLevel$InnerObject
public final inner class test/TopLevel$NestedClass
public inner class test/TopLevel$InnerInterface
}
+10
View File
@@ -0,0 +1,10 @@
@kotlin.Metadata
public final class Test {
// source: 'jvmOverloads.kt'
public method <init>(): void
public synthetic static method b$default(p0: Test, p1: java.lang.String, p2: int, p3: char, p4: int, p5: java.lang.Object): void
public final @kotlin.jvm.JvmOverloads method b(): void
public final @kotlin.jvm.JvmOverloads method b(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final @kotlin.jvm.JvmOverloads method b(@org.jetbrains.annotations.NotNull p0: java.lang.String, p1: int): void
public final @kotlin.jvm.JvmOverloads method b(@org.jetbrains.annotations.NotNull p0: java.lang.String, p1: int, p2: char): void
}