FIR: set anonymous object constructor return type properly
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
//WITH_RUNTIME
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
public fun <T, R> myWith(receiver: T, block: T.() -> R): R {
|
||||
return receiver.block()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
var result = "fail"
|
||||
|
||||
public fun <T, R> myWith(receiver: T, block: T.() -> R): R {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
open class Foo(val args: String){
|
||||
constructor(arg: Any = 1) : this(arg.toString()) {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
abstract class O(val value: String) {
|
||||
constructor(o: Char = 'O') : this("$o")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// WITH_RUNTIME
|
||||
import kotlin.properties.Delegates.notNull
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// KT-3581
|
||||
|
||||
open class A(val result: String = "OK") {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class A(
|
||||
val a: String = {
|
||||
open class B() {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
fun box(): String {
|
||||
val k = object {
|
||||
val ok = "OK"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class A {
|
||||
operator fun component1() = 1
|
||||
operator fun component2() = 2
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class A(val value: String)
|
||||
|
||||
fun A.test(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
public object SomeObject {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class Clazz {
|
||||
companion object {
|
||||
val a = object {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class A {
|
||||
val z: String = "OK"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
abstract class Your {
|
||||
abstract val your: String
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
abstract class Your {
|
||||
abstract val your: String
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
abstract class Your {
|
||||
abstract val your: String
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// WITH_REFLECT
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// WITH_REFLECT
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
open class LockFreeLinkedListNode(val s: String)
|
||||
private class SendBuffered(s: String) : LockFreeLinkedListNode(s)
|
||||
open class AddLastDesc2<out T : LockFreeLinkedListNode>(val node: T)
|
||||
|
||||
@@ -106,7 +106,7 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
|
||||
BLOCK type=<root>.otherImpl.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IOther]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.otherImpl.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.otherImpl.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IOther]'
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ FILE fqName:<root> fileName:/lambdaInDataClassDefaultParameter.kt
|
||||
BLOCK type=<root>.B.<init>.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B.<init>.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.B.<init>.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
|
||||
@@ -22,7 +22,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
|
||||
BLOCK type=<root>.test1.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test1.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.test1.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
@@ -38,7 +38,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
|
||||
BLOCK type=<root>.test2.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IFoo]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test2.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.test2.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.IFoo]'
|
||||
@@ -89,7 +89,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
|
||||
BLOCK type=<root>.Outer.test3.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer.test3.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Outer.Inner [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Outer.test3.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Outer.Inner'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]'
|
||||
@@ -119,7 +119,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
|
||||
BLOCK type=<root>.test4.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test4.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Outer.Inner [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.test4.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Outer.Inner'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]'
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ FILE fqName:<root> fileName:/enumEntryReferenceFromEnumEntryClass.kt
|
||||
BLOCK type=<root>.MyEnum.Z.anObject.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyEnum.Z.anObject.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.MyEnum.Z.anObject.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
|
||||
@@ -61,7 +61,7 @@ FILE fqName:<root> fileName:/partialSam.kt
|
||||
BLOCK type=<root>.fsi.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.String, kotlin.Int>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.fsi.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.fsi.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.String, kotlin.Int>]'
|
||||
@@ -85,7 +85,7 @@ FILE fqName:<root> fileName:/partialSam.kt
|
||||
BLOCK type=<root>.fis.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.Int, kotlin.String>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.fis.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.fis.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Fn<kotlin.Int, kotlin.String>]'
|
||||
|
||||
@@ -75,7 +75,7 @@ FILE fqName:<root> fileName:/multipleThisReferences.kt
|
||||
BLOCK type=<root>.Host.test.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host.test.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Outer.Inner [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Host.test.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Int) [primary] declared in <root>.Outer.Inner'
|
||||
x: CONST Int type=kotlin.Int value=42
|
||||
|
||||
@@ -113,7 +113,7 @@ FILE fqName:<root> fileName:/objectReference.kt
|
||||
BLOCK type=<root>.Z.anObject.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Z.anObject.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Z.anObject.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
|
||||
@@ -69,7 +69,7 @@ FILE fqName:<root> fileName:/thisOfGenericOuterClass.kt
|
||||
BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Outer.Inner<kotlin.Int>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Outer.Inner<kotlin.Int> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.test.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (y: kotlin.Int) [primary] declared in <root>.Outer.Inner'
|
||||
y: CONST Int type=kotlin.Int value=42
|
||||
|
||||
+3
-3
@@ -6,16 +6,16 @@ FILE fqName:<root> fileName:/thisReferenceBeforeClassDeclared.kt
|
||||
BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.WithCompanion [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.test.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Cannot find delegated constructor call' type=<root>.WithCompanion
|
||||
ERROR_CALL 'Cannot find delegated constructor call' type=<root>.test.<no name provided>
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]'
|
||||
CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=null
|
||||
VAR name:test2 type:<root>.test.<no name provided> [val]
|
||||
BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.WithCompanion [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.test.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (a: <root>.WithCompanion.Companion) [primary] declared in <root>.WithCompanion'
|
||||
a: ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType
|
||||
|
||||
Reference in New Issue
Block a user