-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JVM IR] Use error types in KAPT mode for unresolved delegate types.
^KT-57388 Fixed (cherry picked from commit a525983)
- Loading branch information
Showing
11 changed files
with
259 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
28 changes: 28 additions & 0 deletions
28
...-common/tests/org/jetbrains/kotlin/codegen/AbstractIrKapt3BuilderModeBytecodeShapeTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2010-2023 JetBrains s.r.o. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.jetbrains.kotlin.codegen | ||
|
||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment | ||
import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension | ||
import org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtension | ||
import org.jetbrains.kotlin.test.KotlinTestUtils | ||
import org.jetbrains.kotlin.test.TargetBackend | ||
import java.io.File | ||
|
||
abstract class AbstractIrKapt3BuilderModeBytecodeShapeTest : AbstractKapt3BuilderModeBytecodeShapeTest() { | ||
override val backend: TargetBackend = TargetBackend.JVM_IR | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
.../tests-gen/org/jetbrains/kotlin/codegen/IrKapt3BuilderModeBytecodeShapeTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.