Update tests after switching to LV 1.9
This commit is contained in:
committed by
Space Team
parent
66544a4e00
commit
88efa6bfb6
@@ -3,6 +3,7 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||
// FIR status: don't support legacy feature. UNINITIALIZED_PARAMETER y. See KT-49800
|
||||
// LANGUAGE: -ProhibitIllegalValueParameterUsageInDefaultArguments
|
||||
|
||||
fun f(
|
||||
f1: () -> String = { f2() },
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: -ProhibitIllegalValueParameterUsageInDefaultArguments
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE
|
||||
// FIR status: don't support legacy feature. UNINITIALIZED_PARAMETER y. See KT-49800
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
@kotlin.Metadata
|
||||
public final class Delegate {
|
||||
// source: 'memberExtensionPropertyAndImportFromObject.kt'
|
||||
public method <init>(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Object): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final enum class E {
|
||||
// source: 'memberExtensionPropertyAndImportFromObject.kt'
|
||||
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||
private synthetic final static field $VALUES: E[]
|
||||
public final enum static field X: E
|
||||
private synthetic final static method $entries(): E[]
|
||||
private synthetic final static method $values(): E[]
|
||||
static method <clinit>(): void
|
||||
private method <init>(p0: java.lang.String, p1: int): void
|
||||
public static method getEntries(): kotlin.enums.EnumEntries
|
||||
public static method valueOf(p0: java.lang.String): E
|
||||
public static method values(): E[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MemberExtensionPropertyAndImportFromObjectKt {
|
||||
// source: 'memberExtensionPropertyAndImportFromObject.kt'
|
||||
synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
|
||||
private final static @org.jetbrains.annotations.NotNull field result$delegate: Delegate
|
||||
static method <clinit>(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
public final static @org.jetbrains.annotations.NotNull method getResult(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class O {
|
||||
// source: 'memberExtensionPropertyAndImportFromObject.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull field INSTANCE: O
|
||||
static method <clinit>(): void
|
||||
private method <init>(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getD(@org.jetbrains.annotations.NotNull p0: E): Delegate
|
||||
}
|
||||
+2
@@ -8,8 +8,10 @@ public final class Delegate {
|
||||
@kotlin.Metadata
|
||||
public final enum class E {
|
||||
// source: 'memberExtensionPropertyAndImportFromObject.kt'
|
||||
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||
private synthetic final static field $VALUES: E[]
|
||||
public final enum static field X: E
|
||||
private synthetic final static method $entries(): E[]
|
||||
private synthetic final static method $values(): E[]
|
||||
static method <clinit>(): void
|
||||
private method <init>(p0: java.lang.String, p1: int): void
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// CHECK_BYTECODE_LISTING
|
||||
// FIR_IDENTICAL
|
||||
|
||||
import O.d
|
||||
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
@kotlin.Metadata
|
||||
public final class Delegate {
|
||||
// source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt'
|
||||
public method <init>(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Object): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final enum class E {
|
||||
// source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt'
|
||||
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||
private synthetic final static field $VALUES: E[]
|
||||
public final enum static field X: E
|
||||
private synthetic final static method $entries(): E[]
|
||||
private synthetic final static method $values(): E[]
|
||||
static method <clinit>(): void
|
||||
private method <init>(p0: java.lang.String, p1: int): void
|
||||
public static method getEntries(): kotlin.enums.EnumEntries
|
||||
public static method valueOf(p0: java.lang.String): E
|
||||
public static method values(): E[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MemberExtensionPropertyAndLocalDelegatedPropertyKt {
|
||||
// source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt'
|
||||
synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
|
||||
static method <clinit>(): void
|
||||
private final static method box$lambda$1$lambda$0(p0: Delegate): java.lang.String
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class O {
|
||||
// source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull field INSTANCE: O
|
||||
static method <clinit>(): void
|
||||
private method <init>(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getD(@org.jetbrains.annotations.NotNull p0: E): Delegate
|
||||
}
|
||||
+2
@@ -8,8 +8,10 @@ public final class Delegate {
|
||||
@kotlin.Metadata
|
||||
public final enum class E {
|
||||
// source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt'
|
||||
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||
private synthetic final static field $VALUES: E[]
|
||||
public final enum static field X: E
|
||||
private synthetic final static method $entries(): E[]
|
||||
private synthetic final static method $values(): E[]
|
||||
static method <clinit>(): void
|
||||
private method <init>(p0: java.lang.String, p1: int): void
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// CHECK_BYTECODE_LISTING
|
||||
// FIR_IDENTICAL
|
||||
|
||||
enum class E { X }
|
||||
|
||||
|
||||
+3
@@ -12,12 +12,15 @@ public final class DelegateToEnumKt {
|
||||
@kotlin.Metadata
|
||||
public final enum class E {
|
||||
// source: 'delegateToEnum.kt'
|
||||
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||
private synthetic final static field $VALUES: E[]
|
||||
public final enum static field NOT_OK: E
|
||||
public final enum static field OK: E
|
||||
private synthetic final static method $entries(): E[]
|
||||
private synthetic final static method $values(): E[]
|
||||
static method <clinit>(): void
|
||||
private method <init>(p0: java.lang.String, p1: int): void
|
||||
public static method getEntries(): kotlin.enums.EnumEntries
|
||||
public static method valueOf(p0: java.lang.String): E
|
||||
public static method values(): E[]
|
||||
}
|
||||
|
||||
Vendored
+3
@@ -21,12 +21,15 @@ public final class DelegateToEnumInAClassKt {
|
||||
@kotlin.Metadata
|
||||
public final enum class E {
|
||||
// source: 'delegateToEnumInAClass.kt'
|
||||
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||
private synthetic final static field $VALUES: E[]
|
||||
public final enum static field NOT_OK: E
|
||||
public final enum static field OK: E
|
||||
private synthetic final static method $entries(): E[]
|
||||
private synthetic final static method $values(): E[]
|
||||
static method <clinit>(): void
|
||||
private method <init>(p0: java.lang.String, p1: int): void
|
||||
public static method getEntries(): kotlin.enums.EnumEntries
|
||||
public static method valueOf(p0: java.lang.String): E
|
||||
public static method values(): E[]
|
||||
}
|
||||
|
||||
Vendored
+3
@@ -9,12 +9,15 @@ public final class E$Companion {
|
||||
@kotlin.Metadata
|
||||
public final enum class E {
|
||||
// source: 'withSideEffectsToEnum.kt'
|
||||
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||
private synthetic final static field $VALUES: E[]
|
||||
public final static @org.jetbrains.annotations.NotNull field Companion: E$Companion
|
||||
public final enum static field X: E
|
||||
private synthetic final static method $entries(): E[]
|
||||
private synthetic final static method $values(): E[]
|
||||
static method <clinit>(): void
|
||||
private method <init>(p0: java.lang.String, p1: int): void
|
||||
public static method getEntries(): kotlin.enums.EnumEntries
|
||||
public static method valueOf(p0: java.lang.String): E
|
||||
public static method values(): E[]
|
||||
public final inner class E$Companion
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// K2 status: declaringClass is error for enums since Kotlin 1.9
|
||||
// LANGUAGE: -ProhibitEnumDeclaringClass
|
||||
|
||||
package test
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
// !LANGUAGE: -NestedClassesInEnumEntryShouldBeInner
|
||||
|
||||
enum class E {
|
||||
ENTRY,
|
||||
SUBCLASS {
|
||||
// Because of KT-45115 classes/objects inside enum entries are local in FIR
|
||||
@Suppress("LOCAL_OBJECT_NOT_ALLOWED")
|
||||
object O {
|
||||
fun foo() = 2
|
||||
}
|
||||
override fun bar() = O.foo()
|
||||
};
|
||||
|
||||
object O {
|
||||
fun foo() = 1
|
||||
}
|
||||
open fun bar() = O.foo()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (E.ENTRY.bar() != 1) return "Fail 1"
|
||||
if (E.SUBCLASS.bar() != 2) return "Fail 2"
|
||||
return "OK"
|
||||
}
|
||||
@@ -8,4 +8,4 @@ fun box(): String {
|
||||
add(0, foo)
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 1 java/lang/invoke/LambdaMetafactory
|
||||
// 2 java/lang/invoke/LambdaMetafactory
|
||||
|
||||
// FILE: enumValues.kt
|
||||
enum class ABC(val x: String = "") {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 1 java/lang/invoke/LambdaMetafactory
|
||||
// 2 java/lang/invoke/LambdaMetafactory
|
||||
|
||||
// FILE: enumValues.kt
|
||||
enum class ABC(val x: String = "") {
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||
// WITH_STDLIB
|
||||
|
||||
class Class {
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||
// WITH_STDLIB
|
||||
|
||||
package test
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// WITH_STDLIB
|
||||
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||
|
||||
open class Foo {
|
||||
lateinit var bar: String
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||
// WITH_STDLIB
|
||||
// On JVM, isInitialized on a property from another file is forbidden because lateinit-ness is not included in the an ABI of a property.
|
||||
// IGNORE_BACKEND_K1: JVM, JVM_IR
|
||||
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||
// WITH_STDLIB
|
||||
|
||||
fun <T> eval(fn: () -> T) = fn()
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND: JS, JS_IR_ES6
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||
// WITH_STDLIB
|
||||
|
||||
class Foo {
|
||||
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||
// WITH_STDLIB
|
||||
|
||||
lateinit var bar: String
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: NATIVE
|
||||
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||
// WITH_STDLIB
|
||||
|
||||
// MODULE: lib
|
||||
|
||||
Reference in New Issue
Block a user