Update tests after switching to LV 1.9
This commit is contained in:
committed by
Space Team
parent
66544a4e00
commit
88efa6bfb6
+2
-1
@@ -26,6 +26,7 @@ object CompilerExecutor {
|
|||||||
addAll(options)
|
addAll(options)
|
||||||
add("-d")
|
add("-d")
|
||||||
add(library.absolutePathString())
|
add(library.absolutePathString())
|
||||||
|
add("-XXLanguage:-SkipStandaloneScriptsInSourceRoots")
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
MockLibraryUtil.runJvmCompiler(commands)
|
MockLibraryUtil.runJvmCompiler(commands)
|
||||||
@@ -66,4 +67,4 @@ object CompilerExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class LibraryWasNotCompiledDueToExpectedCompilationError : SkipTestException()
|
class LibraryWasNotCompiledDueToExpectedCompilationError : SkipTestException()
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ class CompilerApiTest : KotlinIntegrationTestBase() {
|
|||||||
fun testSimpleScriptLocal() {
|
fun testSimpleScriptLocal() {
|
||||||
val messageCollector = TestMessageCollector()
|
val messageCollector = TestMessageCollector()
|
||||||
val (code, outputs) = compileLocally(messageCollector, File(getSimpleScriptBaseDir(), "script.kts").absolutePath,
|
val (code, outputs) = compileLocally(messageCollector, File(getSimpleScriptBaseDir(), "script.kts").absolutePath,
|
||||||
"-d", tmpdir.absolutePath, "-Xreport-output-files")
|
"-d", tmpdir.absolutePath, "-Xreport-output-files", "-Xallow-any-scripts-in-source-roots")
|
||||||
Assert.assertEquals(0, code)
|
Assert.assertEquals(0, code)
|
||||||
Assert.assertTrue(outputs.isNotEmpty())
|
Assert.assertTrue(outputs.isNotEmpty())
|
||||||
Assert.assertEquals(File(tmpdir, "Script.class").absolutePath, outputs.first().outputFile?.absolutePath)
|
Assert.assertEquals(File(tmpdir, "Script.class").absolutePath, outputs.first().outputFile?.absolutePath)
|
||||||
@@ -173,7 +173,8 @@ class CompilerApiTest : KotlinIntegrationTestBase() {
|
|||||||
try {
|
try {
|
||||||
val (code, outputs) = compileOnDaemon(
|
val (code, outputs) = compileOnDaemon(
|
||||||
flagFile, compilerId, daemonJVMOptions, daemonOptions, TestMessageCollector(),
|
flagFile, compilerId, daemonJVMOptions, daemonOptions, TestMessageCollector(),
|
||||||
File(getSimpleScriptBaseDir(), "script.kts").absolutePath, "-Xreport-output-files", "-d", tmpdir.absolutePath
|
File(getSimpleScriptBaseDir(), "script.kts").absolutePath,
|
||||||
|
"-Xreport-output-files", "-Xallow-any-scripts-in-source-roots", "-d", tmpdir.absolutePath
|
||||||
)
|
)
|
||||||
Assert.assertEquals(0, code)
|
Assert.assertEquals(0, code)
|
||||||
Assert.assertTrue(outputs.isNotEmpty())
|
Assert.assertTrue(outputs.isNotEmpty())
|
||||||
|
|||||||
+2
-2
@@ -32,9 +32,9 @@ inline class ReservedMembersMfvc(val x: Int, val y: Int) {
|
|||||||
|
|
||||||
inline class SecondaryConstructors(val x: Int) {
|
inline class SecondaryConstructors(val x: Int) {
|
||||||
constructor(y: String) : this(5)
|
constructor(y: String) : this(5)
|
||||||
constructor(x: Int, y: String) : this(x) <!SECONDARY_CONSTRUCTOR_WITH_BODY_INSIDE_VALUE_CLASS!>{
|
constructor(x: Int, y: String) : this(x) {
|
||||||
|
|
||||||
}<!>
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<!VALUE_CLASS_WITHOUT_JVM_INLINE_ANNOTATION!>value<!> class WithInner(val x: String) {
|
<!VALUE_CLASS_WITHOUT_JVM_INLINE_ANNOTATION!>value<!> class WithInner(val x: String) {
|
||||||
|
|||||||
-18
@@ -16857,12 +16857,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt");
|
runTest("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("objectInEnum.kt")
|
|
||||||
public void testObjectInEnum() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/enum/objectInEnum.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ordinal.kt")
|
@TestMetadata("ordinal.kt")
|
||||||
public void testOrdinal() throws Exception {
|
public void testOrdinal() throws Exception {
|
||||||
@@ -20426,12 +20420,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt47744.kt");
|
runTest("compiler/testData/codegen/box/inference/builderInference/kt47744.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("kt48445.kt")
|
|
||||||
public void testKt48445() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt48445.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt48633.kt")
|
@TestMetadata("kt48633.kt")
|
||||||
public void testKt48633() throws Exception {
|
public void testKt48633() throws Exception {
|
||||||
@@ -20444,12 +20432,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt49887.kt");
|
runTest("compiler/testData/codegen/box/inference/builderInference/kt49887.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("kt50520.kt")
|
|
||||||
public void testKt50520() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inference/builderInference/kt50520.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt51988.kt")
|
@TestMetadata("kt51988.kt")
|
||||||
public void testKt51988() throws Exception {
|
public void testKt51988() throws Exception {
|
||||||
|
|||||||
Generated
-6
@@ -232,12 +232,6 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
|||||||
runTest("compiler/testData/ir/irText/classes/kt43217.kt");
|
runTest("compiler/testData/ir/irText/classes/kt43217.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("kt44013.kt")
|
|
||||||
public void testKt44013() throws Exception {
|
|
||||||
runTest("compiler/testData/ir/irText/classes/kt44013.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt45853.kt")
|
@TestMetadata("kt45853.kt")
|
||||||
public void testKt45853() throws Exception {
|
public void testKt45853() throws Exception {
|
||||||
|
|||||||
-6
@@ -232,12 +232,6 @@ public class LightTreeFir2IrTextTestGenerated extends AbstractLightTreeFir2IrTex
|
|||||||
runTest("compiler/testData/ir/irText/classes/kt43217.kt");
|
runTest("compiler/testData/ir/irText/classes/kt43217.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("kt44013.kt")
|
|
||||||
public void testKt44013() throws Exception {
|
|
||||||
runTest("compiler/testData/ir/irText/classes/kt44013.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt45853.kt")
|
@TestMetadata("kt45853.kt")
|
||||||
public void testKt45853() throws Exception {
|
public void testKt45853() throws Exception {
|
||||||
|
|||||||
Vendored
+3
@@ -1,6 +1,9 @@
|
|||||||
public enum AnnotatedParameterInEnumConstructor /* test.AnnotatedParameterInEnumConstructor*/ {
|
public enum AnnotatedParameterInEnumConstructor /* test.AnnotatedParameterInEnumConstructor*/ {
|
||||||
A;
|
A;
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public static kotlin.enums.EnumEntries<test.AnnotatedParameterInEnumConstructor> getEntries();// getEntries()
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static test.AnnotatedParameterInEnumConstructor valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
public static test.AnnotatedParameterInEnumConstructor valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
||||||
|
|
||||||
|
|||||||
+3
@@ -3,6 +3,9 @@ public enum E /* p.E*/ {
|
|||||||
Entry2,
|
Entry2,
|
||||||
@kotlin.Deprecated(message = "b") Entry3;
|
@kotlin.Deprecated(message = "b") Entry3;
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public static kotlin.enums.EnumEntries<p.E> getEntries();// getEntries()
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static p.E valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
public static p.E valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
public enum MyEnumClass /* one.MyEnumClass*/ {
|
public enum MyEnumClass /* one.MyEnumClass*/ {
|
||||||
Entry;
|
Entry;
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public static kotlin.enums.EnumEntries<one.MyEnumClass> getEntries();// getEntries()
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static one.MyEnumClass valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
public static one.MyEnumClass valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
||||||
|
|
||||||
|
|||||||
Vendored
+3
@@ -7,5 +7,8 @@ public enum EnumNameOverride /* EnumNameOverride*/ implements Bar {
|
|||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static EnumNameOverride[] values();// values()
|
public static EnumNameOverride[] values();// values()
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public static kotlin.enums.EnumEntries<EnumNameOverride> getEntries();// getEntries()
|
||||||
|
|
||||||
private EnumNameOverride();// .ctor()
|
private EnumNameOverride();// .ctor()
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -44,6 +44,9 @@ public enum StrangeEnum /* StrangeEnum*/ {
|
|||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static StrangeEnum[] values();// values()
|
public static StrangeEnum[] values();// values()
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public static kotlin.enums.EnumEntries<StrangeEnum> getEntries();// getEntries()
|
||||||
|
|
||||||
private StrangeEnum(java.lang.String);// .ctor(java.lang.String)
|
private StrangeEnum(java.lang.String);// .ctor(java.lang.String)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
@@ -44,6 +44,9 @@ public enum StrangeEnum /* StrangeEnum*/ {
|
|||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static StrangeEnum[] values();// values()
|
public static StrangeEnum[] values();// values()
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public static kotlin.enums.EnumEntries<StrangeEnum> getEntries();// getEntries()
|
||||||
|
|
||||||
private StrangeEnum(java.lang.String);// .ctor(java.lang.String)
|
private StrangeEnum(java.lang.String);// .ctor(java.lang.String)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
warning: language version 1.9 is experimental, there are no backwards compatibility guarantees for new language and library features
|
|
||||||
error: old Kotlin/JS compiler is no longer supported. Please migrate to the new JS IR backend
|
error: old Kotlin/JS compiler is no longer supported. Please migrate to the new JS IR backend
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
error: language version 1.1 is no longer supported; please, use version 1.3 or greater.
|
error: language version 1.1 is no longer supported; please, use version 1.4 or greater.
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
error: unknown API version: 239.42
|
error: unknown API version: 239.42
|
||||||
Supported API versions: 1.3 (deprecated), 1.4 (deprecated), 1.5, 1.6, 1.7, 1.8, 1.9 (experimental), 2.0 (experimental)
|
Supported API versions: 1.4 (deprecated), 1.5 (deprecated), 1.6, 1.7, 1.8, 1.9, 2.0 (experimental)
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
warning: API version 1.4 is deprecated and its support will be removed in a future version of Kotlin
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
compiler/testData/cli/jvm/apiVersion.kt:4:5: warning: parameter 'p00' is never used
|
compiler/testData/cli/jvm/apiVersion.kt:4:5: warning: parameter 'p00' is never used
|
||||||
p00: A, p01: A, p02: A, p03: A, p04: A, p05: A, p06: A, p07: A, p08: A, p09: A,
|
p00: A, p01: A, p02: A, p03: A, p04: A, p05: A, p06: A, p07: A, p08: A, p09: A,
|
||||||
^
|
^
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
warning: API version 1.4 is deprecated and its support will be removed in a future version of Kotlin
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
compiler/testData/cli/jvm/apiVersion.kt:4:5: warning: parameter 'p00' is never used
|
compiler/testData/cli/jvm/apiVersion.kt:4:5: warning: parameter 'p00' is never used
|
||||||
p00: A, p01: A, p02: A, p03: A, p04: A, p05: A, p06: A, p07: A, p08: A, p09: A,
|
p00: A, p01: A, p02: A, p03: A, p04: A, p05: A, p06: A, p07: A, p08: A, p09: A,
|
||||||
^
|
^
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
error: API version 1.1 is no longer supported; please, use version 1.3 or greater.
|
error: API version 1.1 is no longer supported; please, use version 1.4 or greater.
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
warning: flag is not supported by this version of the compiler: -Xdouble ' quote ' escaped " sequence /
|
warning: flag is not supported by this version of the compiler: -Xdouble ' quote ' escaped " sequence /
|
||||||
warning: flag is not supported by this version of the compiler: -Xsingle " quote " escaped ' sequence /
|
warning: flag is not supported by this version of the compiler: -Xsingle " quote " escaped ' sequence /
|
||||||
warning: API version 1.4 is deprecated and its support will be removed in a future version of Kotlin
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
compiler/testData/cli/jvm/apiVersion.kt:4:5: warning: parameter 'p00' is never used
|
compiler/testData/cli/jvm/apiVersion.kt:4:5: warning: parameter 'p00' is never used
|
||||||
p00: A, p01: A, p02: A, p03: A, p04: A, p05: A, p06: A, p07: A, p08: A, p09: A,
|
p00: A, p01: A, p02: A, p03: A, p04: A, p05: A, p06: A, p07: A, p08: A, p09: A,
|
||||||
^
|
^
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
error: language version 1.2 is no longer supported; please, use version 1.3 or greater.
|
error: language version 1.2 is no longer supported; please, use version 1.4 or greater.
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ This mode is not recommended for production use,
|
|||||||
as no stability/compatibility guarantees are given on
|
as no stability/compatibility guarantees are given on
|
||||||
compiler or generated code. Use it at your own risk!
|
compiler or generated code. Use it at your own risk!
|
||||||
|
|
||||||
compiler/testData/cli/jvm/enumEntriesForJavaNotEnabled.kt:4:49: error: the feature "enum entries" is only available since language version 1.9
|
compiler/testData/cli/jvm/enumEntriesForJavaNotEnabled.kt:4:49: error: the feature "enum entries" is disabled
|
||||||
val entries = java.util.concurrent.TimeUnit.entries
|
val entries = java.util.concurrent.TimeUnit.entries
|
||||||
^
|
^
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ This mode is not recommended for production use,
|
|||||||
as no stability/compatibility guarantees are given on
|
as no stability/compatibility guarantees are given on
|
||||||
compiler or generated code. Use it at your own risk!
|
compiler or generated code. Use it at your own risk!
|
||||||
|
|
||||||
compiler/testData/cli/jvm/enumEntriesNotEnabled.kt:7:26: error: the feature "enum entries" is only available since language version 1.9
|
compiler/testData/cli/jvm/enumEntriesNotEnabled.kt:7:26: error: the feature "enum entries" is disabled
|
||||||
val entries = MyEnum.entries
|
val entries = MyEnum.entries
|
||||||
^
|
^
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: warning: type mismatch: inferred type is Nothing? but String was expected
|
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: warning: type mismatch: inferred type is Nothing? but String was expected
|
||||||
a.foo(null)
|
a.foo(null)
|
||||||
^
|
^
|
||||||
|
|||||||
+2
-5
@@ -1,7 +1,4 @@
|
|||||||
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: warning: type mismatch: inferred type is Nothing? but String was expected
|
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null can not be a value of a non-null type String
|
||||||
a.foo(null)
|
a.foo(null)
|
||||||
^
|
^
|
||||||
compiler/testData/cli/jvm/jspecifyUsage.kt:3:5: warning: unsafe use of a nullable receiver of type String?
|
COMPILATION_ERROR
|
||||||
a.bar().hashCode()
|
|
||||||
^
|
|
||||||
OK
|
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
OK
|
OK
|
||||||
|
|||||||
+1
@@ -7,5 +7,6 @@ This mode is not recommended for production use,
|
|||||||
as no stability/compatibility guarantees are given on
|
as no stability/compatibility guarantees are given on
|
||||||
compiler or generated code. Use it at your own risk!
|
compiler or generated code. Use it at your own risk!
|
||||||
|
|
||||||
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
info: using preview Java language features
|
info: using preview Java language features
|
||||||
OK
|
OK
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ This mode is not recommended for production use,
|
|||||||
as no stability/compatibility guarantees are given on
|
as no stability/compatibility guarantees are given on
|
||||||
compiler or generated code. Use it at your own risk!
|
compiler or generated code. Use it at your own risk!
|
||||||
|
|
||||||
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
compiler/testData/cli/jvm/jvmRecord.kt:1:1: error: using @JvmRecord is only allowed with -jvm-target 16 or later (or -jvm-target 15 with the -Xjvm-enable-preview flag enabled)
|
compiler/testData/cli/jvm/jvmRecord.kt:1:1: error: using @JvmRecord is only allowed with -jvm-target 16 or later (or -jvm-target 15 with the -Xjvm-enable-preview flag enabled)
|
||||||
@JvmRecord
|
@JvmRecord
|
||||||
^
|
^
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
error: language version 1.0 is no longer supported; please, use version 1.3 or greater.
|
error: language version 1.0 is no longer supported; please, use version 1.4 or greater.
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
error: unknown language version: 239.42
|
error: unknown language version: 239.42
|
||||||
Supported language versions: 1.3 (deprecated), 1.4 (deprecated), 1.5, 1.6, 1.7, 1.8, 1.9 (experimental), 2.0 (experimental)
|
Supported language versions: 1.4 (deprecated), 1.5 (deprecated), 1.6, 1.7, 1.8, 1.9, 2.0 (experimental)
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
error: language version 1.1 is no longer supported; please, use version 1.3 or greater.
|
error: language version 1.1 is no longer supported; please, use version 1.4 or greater.
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
warning: API version 1.4 is deprecated and its support will be removed in a future version of Kotlin
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
compiler/testData/cli/jvm/apiVersion.kt:4:5: warning: parameter 'p00' is never used
|
compiler/testData/cli/jvm/apiVersion.kt:4:5: warning: parameter 'p00' is never used
|
||||||
p00: A, p01: A, p02: A, p03: A, p04: A, p05: A, p06: A, p07: A, p08: A, p09: A,
|
p00: A, p01: A, p02: A, p03: A, p04: A, p05: A, p06: A, p07: A, p08: A, p09: A,
|
||||||
^
|
^
|
||||||
|
|||||||
+1
@@ -1,3 +1,4 @@
|
|||||||
warning: language version is automatically inferred to 1.5 when using the old JVM backend. Consider specifying -language-version explicitly, or remove -Xuse-old-backend
|
warning: language version is automatically inferred to 1.5 when using the old JVM backend. Consider specifying -language-version explicitly, or remove -Xuse-old-backend
|
||||||
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
error: -Xuse-old-backend is no longer supported. Please migrate to the new JVM IR backend
|
error: -Xuse-old-backend is no longer supported. Please migrate to the new JVM IR backend
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
warning: language version is automatically inferred to 1.5 when using the old JVM backend. Consider specifying -language-version explicitly, or remove -Xuse-old-backend
|
warning: language version is automatically inferred to 1.5 when using the old JVM backend. Consider specifying -language-version explicitly, or remove -Xuse-old-backend
|
||||||
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
warning: -Xuse-old-backend is no longer supported. Please migrate to the new JVM IR backend
|
warning: -Xuse-old-backend is no longer supported. Please migrate to the new JVM IR backend
|
||||||
OK
|
OK
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
compiler/testData/cli/jvm/progressive/tailrecOnVirtualMember.kt:2:5: error: tailrec is not allowed on open members
|
compiler/testData/cli/jvm/progressive/tailrecOnVirtualMember.kt:2:5: error: tailrec is not allowed on open members
|
||||||
tailrec open fun foo(x: Int) {}
|
tailrec open fun foo(x: Int) {}
|
||||||
^
|
^
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
error: language version 1.1 is no longer supported; please, use version 1.3 or greater.
|
error: language version 1.1 is no longer supported; please, use version 1.4 or greater.
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
|
||||||
OK
|
OK
|
||||||
|
|||||||
+4
@@ -7,10 +7,14 @@ final class foo/Kotlin$A : foo/Kotlin {
|
|||||||
|
|
||||||
Ljava/lang/Enum<Lfoo/Kotlin;>;
|
Ljava/lang/Enum<Lfoo/Kotlin;>;
|
||||||
public class foo/Kotlin : java/lang/Enum {
|
public class foo/Kotlin : java/lang/Enum {
|
||||||
|
private final static kotlin.enums.EnumEntries $ENTRIES
|
||||||
|
|
||||||
private final static foo.Kotlin[] $VALUES
|
private final static foo.Kotlin[] $VALUES
|
||||||
|
|
||||||
public final static foo.Kotlin A
|
public final static foo.Kotlin A
|
||||||
|
|
||||||
|
private final static foo.Kotlin[] $entries()
|
||||||
|
|
||||||
private final static foo.Kotlin[] $values()
|
private final static foo.Kotlin[] $values()
|
||||||
|
|
||||||
static void <clinit>()
|
static void <clinit>()
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
// IGNORE_BACKEND_K2: JVM_IR
|
// IGNORE_BACKEND_K2: JVM_IR
|
||||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||||
// FIR status: don't support legacy feature. UNINITIALIZED_PARAMETER y. See KT-49800
|
// FIR status: don't support legacy feature. UNINITIALIZED_PARAMETER y. See KT-49800
|
||||||
|
// LANGUAGE: -ProhibitIllegalValueParameterUsageInDefaultArguments
|
||||||
|
|
||||||
fun f(
|
fun f(
|
||||||
f1: () -> String = { f2() },
|
f1: () -> String = { f2() },
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: -ProhibitIllegalValueParameterUsageInDefaultArguments
|
||||||
// IGNORE_BACKEND: JVM
|
// IGNORE_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE
|
// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE
|
||||||
// FIR status: don't support legacy feature. UNINITIALIZED_PARAMETER y. See KT-49800
|
// 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
|
@kotlin.Metadata
|
||||||
public final enum class E {
|
public final enum class E {
|
||||||
// source: 'memberExtensionPropertyAndImportFromObject.kt'
|
// source: 'memberExtensionPropertyAndImportFromObject.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: E[]
|
private synthetic final static field $VALUES: E[]
|
||||||
public final enum static field X: E
|
public final enum static field X: E
|
||||||
|
private synthetic final static method $entries(): E[]
|
||||||
private synthetic final static method $values(): E[]
|
private synthetic final static method $values(): E[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int): void
|
private method <init>(p0: java.lang.String, p1: int): void
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// CHECK_BYTECODE_LISTING
|
// CHECK_BYTECODE_LISTING
|
||||||
// FIR_IDENTICAL
|
|
||||||
|
|
||||||
import O.d
|
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
|
@kotlin.Metadata
|
||||||
public final enum class E {
|
public final enum class E {
|
||||||
// source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt'
|
// source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: E[]
|
private synthetic final static field $VALUES: E[]
|
||||||
public final enum static field X: E
|
public final enum static field X: E
|
||||||
|
private synthetic final static method $entries(): E[]
|
||||||
private synthetic final static method $values(): E[]
|
private synthetic final static method $values(): E[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int): void
|
private method <init>(p0: java.lang.String, p1: int): void
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// CHECK_BYTECODE_LISTING
|
// CHECK_BYTECODE_LISTING
|
||||||
// FIR_IDENTICAL
|
|
||||||
|
|
||||||
enum class E { X }
|
enum class E { X }
|
||||||
|
|
||||||
|
|||||||
+3
@@ -12,12 +12,15 @@ public final class DelegateToEnumKt {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final enum class E {
|
public final enum class E {
|
||||||
// source: 'delegateToEnum.kt'
|
// source: 'delegateToEnum.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: E[]
|
private synthetic final static field $VALUES: E[]
|
||||||
public final enum static field NOT_OK: E
|
public final enum static field NOT_OK: E
|
||||||
public final enum static field OK: E
|
public final enum static field OK: E
|
||||||
|
private synthetic final static method $entries(): E[]
|
||||||
private synthetic final static method $values(): E[]
|
private synthetic final static method $values(): E[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int): 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 valueOf(p0: java.lang.String): E
|
||||||
public static method values(): E[]
|
public static method values(): E[]
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+3
@@ -21,12 +21,15 @@ public final class DelegateToEnumInAClassKt {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final enum class E {
|
public final enum class E {
|
||||||
// source: 'delegateToEnumInAClass.kt'
|
// source: 'delegateToEnumInAClass.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: E[]
|
private synthetic final static field $VALUES: E[]
|
||||||
public final enum static field NOT_OK: E
|
public final enum static field NOT_OK: E
|
||||||
public final enum static field OK: E
|
public final enum static field OK: E
|
||||||
|
private synthetic final static method $entries(): E[]
|
||||||
private synthetic final static method $values(): E[]
|
private synthetic final static method $values(): E[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int): 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 valueOf(p0: java.lang.String): E
|
||||||
public static method values(): E[]
|
public static method values(): E[]
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+3
@@ -9,12 +9,15 @@ public final class E$Companion {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final enum class E {
|
public final enum class E {
|
||||||
// source: 'withSideEffectsToEnum.kt'
|
// source: 'withSideEffectsToEnum.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: E[]
|
private synthetic final static field $VALUES: E[]
|
||||||
public final static @org.jetbrains.annotations.NotNull field Companion: E$Companion
|
public final static @org.jetbrains.annotations.NotNull field Companion: E$Companion
|
||||||
public final enum static field X: E
|
public final enum static field X: E
|
||||||
|
private synthetic final static method $entries(): E[]
|
||||||
private synthetic final static method $values(): E[]
|
private synthetic final static method $values(): E[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int): 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 valueOf(p0: java.lang.String): E
|
||||||
public static method values(): E[]
|
public static method values(): E[]
|
||||||
public final inner class E$Companion
|
public final inner class E$Companion
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_K2: JVM_IR
|
// IGNORE_BACKEND_K2: JVM_IR
|
||||||
// K2 status: declaringClass is error for enums since Kotlin 1.9
|
// K2 status: declaringClass is error for enums since Kotlin 1.9
|
||||||
|
// LANGUAGE: -ProhibitEnumDeclaringClass
|
||||||
|
|
||||||
package test
|
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)
|
add(0, foo)
|
||||||
}
|
}
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
// CHECK_BYTECODE_TEXT
|
// CHECK_BYTECODE_TEXT
|
||||||
// JVM_IR_TEMPLATES
|
// JVM_IR_TEMPLATES
|
||||||
// 1 java/lang/invoke/LambdaMetafactory
|
// 2 java/lang/invoke/LambdaMetafactory
|
||||||
|
|
||||||
// FILE: enumValues.kt
|
// FILE: enumValues.kt
|
||||||
enum class ABC(val x: String = "") {
|
enum class ABC(val x: String = "") {
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
// CHECK_BYTECODE_TEXT
|
// CHECK_BYTECODE_TEXT
|
||||||
// JVM_IR_TEMPLATES
|
// JVM_IR_TEMPLATES
|
||||||
// 1 java/lang/invoke/LambdaMetafactory
|
// 2 java/lang/invoke/LambdaMetafactory
|
||||||
|
|
||||||
// FILE: enumValues.kt
|
// FILE: enumValues.kt
|
||||||
enum class ABC(val x: String = "") {
|
enum class ABC(val x: String = "") {
|
||||||
|
|||||||
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
class Class {
|
class Class {
|
||||||
|
|||||||
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
package test
|
package test
|
||||||
|
|||||||
Vendored
+1
@@ -1,4 +1,5 @@
|
|||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||||
|
|
||||||
open class Foo {
|
open class Foo {
|
||||||
lateinit var bar: String
|
lateinit var bar: String
|
||||||
|
|||||||
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||||
// WITH_STDLIB
|
// 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.
|
// 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
|
// IGNORE_BACKEND_K1: JVM, JVM_IR
|
||||||
|
|||||||
Vendored
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
fun <T> eval(fn: () -> T) = fn()
|
fun <T> eval(fn: () -> T) = fn()
|
||||||
|
|||||||
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// IGNORE_BACKEND: JS, JS_IR_ES6
|
// IGNORE_BACKEND: JS, JS_IR_ES6
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
class Foo {
|
class Foo {
|
||||||
|
|||||||
Vendored
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
lateinit var bar: String
|
lateinit var bar: String
|
||||||
|
|||||||
+1
@@ -1,4 +1,5 @@
|
|||||||
// TARGET_BACKEND: NATIVE
|
// TARGET_BACKEND: NATIVE
|
||||||
|
// LANGUAGE: -NativeJsProhibitLateinitIsInitalizedIntrinsicWithoutPrivateAccess
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
// MODULE: lib
|
// MODULE: lib
|
||||||
|
|||||||
+3
@@ -1,13 +1,16 @@
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final enum class Test {
|
public final enum class Test {
|
||||||
// source: 'deprecatedEnumEntryFields.kt'
|
// source: 'deprecatedEnumEntryFields.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: Test[]
|
private synthetic final static field $VALUES: Test[]
|
||||||
public deprecated final enum static @kotlin.Deprecated(message="") field ENTRY1: Test
|
public deprecated final enum static @kotlin.Deprecated(message="") field ENTRY1: Test
|
||||||
public final enum static field ENTRY2: Test
|
public final enum static field ENTRY2: Test
|
||||||
public deprecated final enum static @kotlin.Deprecated(message="") field ENTRY3: Test
|
public deprecated final enum static @kotlin.Deprecated(message="") field ENTRY3: Test
|
||||||
|
private synthetic final static method $entries(): Test[]
|
||||||
private synthetic final static method $values(): Test[]
|
private synthetic final static method $values(): Test[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int): 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): Test
|
public static method valueOf(p0: java.lang.String): Test
|
||||||
public static method values(): Test[]
|
public static method values(): Test[]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public class Base {
|
|||||||
public final class Derived {
|
public final class Derived {
|
||||||
// source: 'hidden.kt'
|
// source: 'hidden.kt'
|
||||||
public synthetic deprecated @kotlin.Deprecated(message="", level=HIDDEN) method <init>(): void
|
public synthetic deprecated @kotlin.Deprecated(message="", level=HIDDEN) method <init>(): void
|
||||||
public synthetic method f(): void
|
public method f(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ public annotation class Ann {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final enum class SimpleEnum {
|
public final enum class SimpleEnum {
|
||||||
// source: 'enum.kt'
|
// source: 'enum.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: SimpleEnum[]
|
private synthetic final static field $VALUES: SimpleEnum[]
|
||||||
public final enum static field A: SimpleEnum
|
public final enum static field A: SimpleEnum
|
||||||
public final enum static field B: SimpleEnum
|
public final enum static field B: SimpleEnum
|
||||||
public final enum static field C: SimpleEnum
|
public final enum static field C: SimpleEnum
|
||||||
|
private synthetic final static method $entries(): SimpleEnum[]
|
||||||
private synthetic final static method $values(): SimpleEnum[]
|
private synthetic final static method $values(): SimpleEnum[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int): void
|
private method <init>(p0: java.lang.String, p1: int): void
|
||||||
@@ -21,9 +23,11 @@ public final enum class SimpleEnum {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final enum class WithAnnotations {
|
public final enum class WithAnnotations {
|
||||||
// source: 'enum.kt'
|
// source: 'enum.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: WithAnnotations[]
|
private synthetic final static field $VALUES: WithAnnotations[]
|
||||||
public final enum static @Ann field A: WithAnnotations
|
public final enum static @Ann field A: WithAnnotations
|
||||||
public final enum static @Ann field B: WithAnnotations
|
public final enum static @Ann field B: WithAnnotations
|
||||||
|
private synthetic final static method $entries(): WithAnnotations[]
|
||||||
private synthetic final static method $values(): WithAnnotations[]
|
private synthetic final static method $values(): WithAnnotations[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int): void
|
private method <init>(p0: java.lang.String, p1: int): void
|
||||||
@@ -34,11 +38,13 @@ public final enum class WithAnnotations {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final enum class WithConstructor {
|
public final enum class WithConstructor {
|
||||||
// source: 'enum.kt'
|
// source: 'enum.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: WithConstructor[]
|
private synthetic final static field $VALUES: WithConstructor[]
|
||||||
public final enum static field A: WithConstructor
|
public final enum static field A: WithConstructor
|
||||||
public final enum static field B: WithConstructor
|
public final enum static field B: WithConstructor
|
||||||
public final enum static field C: WithConstructor
|
public final enum static field C: WithConstructor
|
||||||
private final @org.jetbrains.annotations.NotNull field x: java.lang.String
|
private final @org.jetbrains.annotations.NotNull field x: java.lang.String
|
||||||
|
private synthetic final static method $entries(): WithConstructor[]
|
||||||
private synthetic final static method $values(): WithConstructor[]
|
private synthetic final static method $values(): WithConstructor[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int, p2: java.lang.String): void
|
private method <init>(p0: java.lang.String, p1: int, p2: java.lang.String): void
|
||||||
@@ -58,9 +64,11 @@ final class WithEntryClass$A {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public abstract enum class WithEntryClass {
|
public abstract enum class WithEntryClass {
|
||||||
// source: 'enum.kt'
|
// source: 'enum.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: WithEntryClass[]
|
private synthetic final static field $VALUES: WithEntryClass[]
|
||||||
public final enum static field A: WithEntryClass
|
public final enum static field A: WithEntryClass
|
||||||
final inner class WithEntryClass$A
|
final inner class WithEntryClass$A
|
||||||
|
private synthetic final static method $entries(): WithEntryClass[]
|
||||||
private synthetic final static method $values(): WithEntryClass[]
|
private synthetic final static method $values(): WithEntryClass[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int): void
|
private method <init>(p0: java.lang.String, p1: int): void
|
||||||
|
|||||||
+2
@@ -30,9 +30,11 @@ public class TestBasic {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final enum class TestEnum {
|
public final enum class TestEnum {
|
||||||
// source: 'inlineClassTypeParametersInConstructor.kt'
|
// source: 'inlineClassTypeParametersInConstructor.kt'
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private synthetic final static field $VALUES: TestEnum[]
|
private synthetic final static field $VALUES: TestEnum[]
|
||||||
public final enum static field ANSWER: TestEnum
|
public final enum static field ANSWER: TestEnum
|
||||||
private final field z: int
|
private final field z: int
|
||||||
|
private synthetic final static method $entries(): TestEnum[]
|
||||||
private synthetic final static method $values(): TestEnum[]
|
private synthetic final static method $values(): TestEnum[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String, p1: int, p2: int): void
|
private method <init>(p0: java.lang.String, p1: int, p2: int): void
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ public final enum class A$B$C {
|
|||||||
public final enum static field C2: A$B$C
|
public final enum static field C2: A$B$C
|
||||||
public final enum static field C3: A$B$C
|
public final enum static field C3: A$B$C
|
||||||
private synthetic final static field $VALUES: A$B$C[]
|
private synthetic final static field $VALUES: A$B$C[]
|
||||||
|
private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries
|
||||||
private method <init>(p0: java.lang.String, p1: int): void
|
private method <init>(p0: java.lang.String, p1: int): void
|
||||||
public static method values(): A$B$C[]
|
public static method values(): A$B$C[]
|
||||||
public static method valueOf(p0: java.lang.String): A$B$C
|
public static method valueOf(p0: java.lang.String): A$B$C
|
||||||
private synthetic final static method $values(): A$B$C[]
|
private synthetic final static method $values(): A$B$C[]
|
||||||
|
private synthetic final static method $entries(): A$B$C[]
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-1
@@ -1 +0,0 @@
|
|||||||
OK
|
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
OK
|
||||||
+12
-12
@@ -1,37 +1,37 @@
|
|||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.8. This declaration is only supported since Kotlin 42.33
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.9. This declaration is only supported since Kotlin 42.33
|
||||||
fun test(a: A): TA {
|
fun test(a: A): TA {
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.9
|
||||||
fun test(a: A): TA {
|
fun test(a: A): TA {
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.9
|
||||||
fun test(a: A): TA {
|
fun test(a: A): TA {
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.8. This declaration is only supported since Kotlin 42.33
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.9. This declaration is only supported since Kotlin 42.33
|
||||||
fun test(a: A): TA {
|
fun test(a: A): TA {
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.9
|
||||||
fun test(a: A): TA {
|
fun test(a: A): TA {
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.9
|
||||||
fun test(a: A): TA {
|
fun test(a: A): TA {
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.8. This declaration is only supported since Kotlin 42.33
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.9. This declaration is only supported since Kotlin 42.33
|
||||||
f()
|
f()
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.9
|
||||||
f()
|
f()
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.9
|
||||||
f()
|
f()
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.8. This declaration is only supported since Kotlin 42.33
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.9. This declaration is only supported since Kotlin 42.33
|
||||||
return p
|
return p
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.9
|
||||||
return p
|
return p
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.9
|
||||||
return p
|
return p
|
||||||
^
|
^
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.9
|
||||||
fun test(a: Outer.Nested) {
|
fun test(a: Outer.Nested) {
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.9
|
||||||
a.f()
|
a.f()
|
||||||
^
|
^
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.9
|
||||||
fun test(a: Outer.Nested) {
|
fun test(a: Outer.Nested) {
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.9
|
||||||
a.f()
|
a.f()
|
||||||
^
|
^
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.9
|
||||||
fun test(a: Outer.Nested) {
|
fun test(a: Outer.Nested) {
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.8
|
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.9
|
||||||
a.f()
|
a.f()
|
||||||
^
|
^
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
+8
-7
@@ -1,24 +1,25 @@
|
|||||||
error: incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
|
error: incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
|
||||||
$TMP_DIR$/library.jar!/META-INF/main.kotlin_module: error: module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is $ABI_VERSION$.
|
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:3:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.0.0, but the compiler version $ABI_VERSION$ can read versions up to $ABI_VERSION$.
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:3:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The actual metadata version is 1.9.0, but the compiler version $ABI_VERSION$ can read versions up to $ABI_VERSION$.
|
|
||||||
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
||||||
fun test(c: C) {
|
fun test(c: C) {
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:4:5: error: unresolved reference: f
|
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:4:5: error: class 'a.AKt' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.0.0, but the compiler version $ABI_VERSION$ can read versions up to $ABI_VERSION$.
|
||||||
|
The class is loaded from $TMP_DIR$/library.jar!/a/AKt.class
|
||||||
f()
|
f()
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:5:5: error: unresolved reference: v
|
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:5:5: error: class 'a.AKt' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.0.0, but the compiler version $ABI_VERSION$ can read versions up to $ABI_VERSION$.
|
||||||
|
The class is loaded from $TMP_DIR$/library.jar!/a/AKt.class
|
||||||
v
|
v
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:5: error: class 'a.C' was compiled with an incompatible version of Kotlin. The actual metadata version is 1.9.0, but the compiler version $ABI_VERSION$ can read versions up to $ABI_VERSION$.
|
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:5: error: class 'a.C' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.0.0, but the compiler version $ABI_VERSION$ can read versions up to $ABI_VERSION$.
|
||||||
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
||||||
c.let { C() }
|
c.let { C() }
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:7: error: class 'a.C' was compiled with an incompatible version of Kotlin. The actual metadata version is 1.9.0, but the compiler version $ABI_VERSION$ can read versions up to $ABI_VERSION$.
|
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:7: error: class 'a.C' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.0.0, but the compiler version $ABI_VERSION$ can read versions up to $ABI_VERSION$.
|
||||||
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
||||||
c.let { C() }
|
c.let { C() }
|
||||||
^
|
^
|
||||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The actual metadata version is 1.9.0, but the compiler version $ABI_VERSION$ can read versions up to $ABI_VERSION$.
|
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.0.0, but the compiler version $ABI_VERSION$ can read versions up to $ABI_VERSION$.
|
||||||
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
||||||
c.let { C() }
|
c.let { C() }
|
||||||
^
|
^
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ val z = 3
|
|||||||
|
|
||||||
fun foo(x: Int = <!UNINITIALIZED_PARAMETER!>y<!>, y: Int = x, i : Int = z): Int = x + y
|
fun foo(x: Int = <!UNINITIALIZED_PARAMETER!>y<!>, y: Int = x, i : Int = z): Int = x + y
|
||||||
|
|
||||||
fun foo(x: () -> Int = { <!UNINITIALIZED_PARAMETER_WARNING!>y<!> }, y: Int = x(), i : Int = z): Int = x() + y
|
fun foo(x: () -> Int = { <!UNINITIALIZED_PARAMETER!>y<!> }, y: Int = x(), i : Int = z): Int = x() + y
|
||||||
|
|
||||||
fun bar(x: () -> Int = { <!UNINITIALIZED_PARAMETER_WARNING!>y<!>; 1 }, y: Int) {}
|
fun bar(x: () -> Int = { <!UNINITIALIZED_PARAMETER!>y<!>; 1 }, y: Int) {}
|
||||||
|
|
||||||
fun baz(
|
fun baz(
|
||||||
x: () -> Int = {
|
x: () -> Int = {
|
||||||
fun bar(xx: () -> Int = { <!UNINITIALIZED_PARAMETER_WARNING!>y<!>; 1 }) = xx
|
fun bar(xx: () -> Int = { <!UNINITIALIZED_PARAMETER!>y<!>; 1 }) = xx
|
||||||
bar()()
|
bar()()
|
||||||
},
|
},
|
||||||
y: Int
|
y: Int
|
||||||
@@ -30,7 +30,7 @@ fun baz(
|
|||||||
|
|
||||||
fun boo(
|
fun boo(
|
||||||
x: () -> Int = {
|
x: () -> Int = {
|
||||||
fun bar(): Int = <!UNINITIALIZED_PARAMETER_WARNING!>y<!>
|
fun bar(): Int = <!UNINITIALIZED_PARAMETER!>y<!>
|
||||||
bar()
|
bar()
|
||||||
},
|
},
|
||||||
y: Int
|
y: Int
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ fun foo(a: (String) -> Unit) {
|
|||||||
interface A : (String) -> Unit {}
|
interface A : (String) -> Unit {}
|
||||||
typealias AliasedEFT = ExtensionFunctionType
|
typealias AliasedEFT = ExtensionFunctionType
|
||||||
|
|
||||||
fun foo(a: <!WRONG_EXTENSION_FUNCTION_TYPE_WARNING!>@AliasedEFT<!> A) {
|
fun foo(a: <!WRONG_EXTENSION_FUNCTION_TYPE!>@AliasedEFT<!> A) {
|
||||||
// @Extension annotation on an unrelated type shouldn't have any effect on this diagnostic.
|
// @Extension annotation on an unrelated type shouldn't have any effect on this diagnostic.
|
||||||
// Only kotlin.Function{n} type annotated with @Extension should
|
// Only kotlin.Function{n} type annotated with @Extension should
|
||||||
"".a()
|
"".a()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ fun foo(a: (String) -> Unit) {
|
|||||||
interface A : (String) -> Unit {}
|
interface A : (String) -> Unit {}
|
||||||
typealias AliasedEFT = ExtensionFunctionType
|
typealias AliasedEFT = ExtensionFunctionType
|
||||||
|
|
||||||
fun foo(a: <!WRONG_EXTENSION_FUNCTION_TYPE_WARNING!>@AliasedEFT<!> A) {
|
fun foo(a: <!WRONG_EXTENSION_FUNCTION_TYPE!>@AliasedEFT<!> A) {
|
||||||
// @Extension annotation on an unrelated type shouldn't have any effect on this diagnostic.
|
// @Extension annotation on an unrelated type shouldn't have any effect on this diagnostic.
|
||||||
// Only kotlin.Function{n} type annotated with @Extension should
|
// Only kotlin.Function{n} type annotated with @Extension should
|
||||||
"".<!UNRESOLVED_REFERENCE!>a<!>()
|
"".<!UNRESOLVED_REFERENCE!>a<!>()
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
// WITH_STDLIB
|
|
||||||
|
|
||||||
fun <E> SmartList(x: E) {}
|
|
||||||
fun <E> SmartList(x: Collection<E>) {}
|
|
||||||
|
|
||||||
fun append(x: Any?) {}
|
|
||||||
fun append(x: Collection<*>) {}
|
|
||||||
|
|
||||||
fun append2(x: Iterable<*>) {}
|
|
||||||
fun append2(x: Collection<*>) {}
|
|
||||||
|
|
||||||
class In<in T>(x: T)
|
|
||||||
|
|
||||||
@JvmName("append31")
|
|
||||||
fun append3(x: In<Nothing>) {}
|
|
||||||
fun append3(x: In<Collection<*>>) {}
|
|
||||||
|
|
||||||
fun <E> append4(x: E) {}
|
|
||||||
fun <E: Collection<*>> append4(x: E) {}
|
|
||||||
|
|
||||||
fun <T> takes(range: T) {}
|
|
||||||
fun <T> takes(range: T) where T : Collection<*>, T: ClosedRange<*> {}
|
|
||||||
|
|
||||||
fun main() {
|
|
||||||
SmartList(1..2) // warning
|
|
||||||
SmartList<IntRange>(1..10) // no warning
|
|
||||||
|
|
||||||
append(1..10) // warning
|
|
||||||
append((1..10) as Any) // no warning
|
|
||||||
append((1..10) as Iterable<Int>) // no warning
|
|
||||||
append("a".."z") // no warning, the range is not iterable
|
|
||||||
append(1.0..2.0)
|
|
||||||
|
|
||||||
append2(1..10) // no warning
|
|
||||||
|
|
||||||
append3(In(1..10)) // no warning
|
|
||||||
|
|
||||||
append4(1..10) // warning
|
|
||||||
|
|
||||||
append4<IntRange>(1..10) // warning
|
|
||||||
|
|
||||||
takes(1..10) // warning
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
fun <E> SmartList(x: E) {}
|
fun <E> SmartList(x: E) {}
|
||||||
@@ -22,10 +23,10 @@ fun <T> takes(range: T) {}
|
|||||||
fun <T> takes(range: T) where T : Collection<*>, T: ClosedRange<*> {}
|
fun <T> takes(range: T) where T : Collection<*>, T: ClosedRange<*> {}
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
SmartList(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..2<!>) // warning
|
SmartList(1..2) // warning
|
||||||
SmartList<IntRange>(1..10) // no warning
|
SmartList<IntRange>(1..10) // no warning
|
||||||
|
|
||||||
append(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
|
append(1..10) // warning
|
||||||
append((1..10) as Any) // no warning
|
append((1..10) as Any) // no warning
|
||||||
append((1..10) as Iterable<Int>) // no warning
|
append((1..10) as Iterable<Int>) // no warning
|
||||||
append("a".."z") // no warning, the range is not iterable
|
append("a".."z") // no warning, the range is not iterable
|
||||||
@@ -35,9 +36,9 @@ fun main() {
|
|||||||
|
|
||||||
append3(In(1..10)) // no warning
|
append3(In(1..10)) // no warning
|
||||||
|
|
||||||
append4(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
|
append4(1..10) // warning
|
||||||
|
|
||||||
append4<IntRange>(1..10) // warning
|
append4<IntRange>(1..10) // warning
|
||||||
|
|
||||||
takes(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
|
takes(1..10) // warning
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
// WITH_STDLIB
|
|
||||||
// !LANGUAGE: +ProgressionsChangingResolve
|
|
||||||
|
|
||||||
fun <E> SmartList(x: E) {}
|
|
||||||
fun <E> SmartList(x: Collection<E>) {}
|
|
||||||
|
|
||||||
fun append(x: Any?) {}
|
|
||||||
fun append(x: Collection<*>) {}
|
|
||||||
|
|
||||||
fun append2(x: Iterable<*>) {}
|
|
||||||
fun append2(x: Collection<*>) {}
|
|
||||||
|
|
||||||
class In<in T>(x: T)
|
|
||||||
|
|
||||||
@JvmName("append31")
|
|
||||||
fun append3(x: In<Nothing>) {}
|
|
||||||
fun append3(x: In<Collection<*>>) {}
|
|
||||||
|
|
||||||
fun <E> append4(x: E) {}
|
|
||||||
fun <E: Collection<*>> append4(x: E) {}
|
|
||||||
|
|
||||||
fun main() {
|
|
||||||
SmartList(1..2) // warning
|
|
||||||
SmartList<IntRange>(1..10) // no warning
|
|
||||||
|
|
||||||
append(1..10) // warning
|
|
||||||
append((1..10) as Any) // no warning
|
|
||||||
append((1..10) as Iterable<Int>) // no warning
|
|
||||||
append("a".."z") // no warning, the range is not iterable
|
|
||||||
append(1.0..2.0)
|
|
||||||
|
|
||||||
append2(1..10) // no warning
|
|
||||||
|
|
||||||
append3(In(1..10)) // no warning
|
|
||||||
|
|
||||||
append4(1..10) // warning
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// !LANGUAGE: +ProgressionsChangingResolve
|
// !LANGUAGE: +ProgressionsChangingResolve
|
||||||
|
|
||||||
@@ -20,10 +21,10 @@ fun <E> append4(x: E) {}
|
|||||||
fun <E: Collection<*>> append4(x: E) {}
|
fun <E: Collection<*>> append4(x: E) {}
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
SmartList(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR("fun <E> SmartList(x: Collection<E>): Unit")!>1..2<!>) // warning
|
SmartList(1..2) // warning
|
||||||
SmartList<IntRange>(1..10) // no warning
|
SmartList<IntRange>(1..10) // no warning
|
||||||
|
|
||||||
append(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR("fun append(x: Collection<*>): Unit")!>1..10<!>) // warning
|
append(1..10) // warning
|
||||||
append((1..10) as Any) // no warning
|
append((1..10) as Any) // no warning
|
||||||
append((1..10) as Iterable<Int>) // no warning
|
append((1..10) as Iterable<Int>) // no warning
|
||||||
append("a".."z") // no warning, the range is not iterable
|
append("a".."z") // no warning, the range is not iterable
|
||||||
@@ -33,5 +34,5 @@ fun main() {
|
|||||||
|
|
||||||
append3(In(1..10)) // no warning
|
append3(In(1..10)) // no warning
|
||||||
|
|
||||||
append4(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR("fun <E : Collection<*>> append4(x: E): Unit")!>1..10<!>) // warning
|
append4(1..10) // warning
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
// WITH_STDLIB
|
|
||||||
// FULL_JDK
|
|
||||||
|
|
||||||
// FILE: JavaSmartList.java
|
|
||||||
import kotlin.ranges.ClosedRange;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
public class JavaSmartList <E> {
|
|
||||||
JavaSmartList(E x) {}
|
|
||||||
JavaSmartList(Collection<E> x) {}
|
|
||||||
|
|
||||||
static void append(Object x) {}
|
|
||||||
static void append(Collection<?> x) {}
|
|
||||||
|
|
||||||
static void append2(Iterable<?> x) {}
|
|
||||||
static void append2(Collection<?> x) {}
|
|
||||||
|
|
||||||
public static class In <T> {
|
|
||||||
In(T x) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void append3(In<?> x) {}
|
|
||||||
static void append3(In<Collection<?>> x) {}
|
|
||||||
|
|
||||||
static <E> void append4(E x) {}
|
|
||||||
static <E extends Collection<?>> void append4(E x) {}
|
|
||||||
|
|
||||||
static <T> void takes(T x) {}
|
|
||||||
static <T extends Collection<?> & ClosedRange<?>> void takes(T x) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FILE: main.kt
|
|
||||||
fun main() {
|
|
||||||
JavaSmartList(1..2) // warning
|
|
||||||
JavaSmartList<IntRange>(1..10) // no warning
|
|
||||||
|
|
||||||
JavaSmartList.append(1..10) // warning
|
|
||||||
JavaSmartList.append((1..10) as Any) // no warning
|
|
||||||
JavaSmartList.append((1..10) as Iterable<Int>) // no warning
|
|
||||||
JavaSmartList.append("a".."z") // no warning, the range is not iterable
|
|
||||||
JavaSmartList.append(1.0..2.0)
|
|
||||||
|
|
||||||
JavaSmartList.append2(1..10) // no warning
|
|
||||||
|
|
||||||
JavaSmartList.append3(JavaSmartList.In(1..10)) // no warning
|
|
||||||
|
|
||||||
JavaSmartList.append4(1..10) // warning
|
|
||||||
|
|
||||||
JavaSmartList.append4<IntRange>(1..10) // warning
|
|
||||||
|
|
||||||
JavaSmartList.takes(1..10) // warning
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
@@ -32,10 +33,10 @@ public class JavaSmartList <E> {
|
|||||||
|
|
||||||
// FILE: main.kt
|
// FILE: main.kt
|
||||||
fun main() {
|
fun main() {
|
||||||
JavaSmartList(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..2<!>) // warning
|
JavaSmartList(1..2) // warning
|
||||||
JavaSmartList<IntRange>(1..10) // no warning
|
JavaSmartList<IntRange>(1..10) // no warning
|
||||||
|
|
||||||
JavaSmartList.append(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
|
JavaSmartList.append(1..10) // warning
|
||||||
JavaSmartList.append((1..10) as Any) // no warning
|
JavaSmartList.append((1..10) as Any) // no warning
|
||||||
JavaSmartList.append((1..10) as Iterable<Int>) // no warning
|
JavaSmartList.append((1..10) as Iterable<Int>) // no warning
|
||||||
JavaSmartList.append("a".."z") // no warning, the range is not iterable
|
JavaSmartList.append("a".."z") // no warning, the range is not iterable
|
||||||
@@ -45,9 +46,9 @@ fun main() {
|
|||||||
|
|
||||||
JavaSmartList.append3(JavaSmartList.In(1..10)) // no warning
|
JavaSmartList.append3(JavaSmartList.In(1..10)) // no warning
|
||||||
|
|
||||||
JavaSmartList.append4(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
|
JavaSmartList.append4(1..10) // warning
|
||||||
|
|
||||||
JavaSmartList.append4<IntRange>(1..10) // warning
|
JavaSmartList.append4<IntRange>(1..10) // warning
|
||||||
|
|
||||||
JavaSmartList.takes(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
|
JavaSmartList.takes(1..10) // warning
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
// SKIP_TXT
|
// SKIP_TXT
|
||||||
|
|
||||||
enum class A(val z: Any) {
|
enum class A(val z: Any) {
|
||||||
Y(<!UNINITIALIZED_ENUM_COMPANION_WARNING, UNINITIALIZED_VARIABLE!>x<!>);
|
Y(<!UNINITIALIZED_ENUM_COMPANION, UNINITIALIZED_VARIABLE!>x<!>);
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val x = A.Y.ordinal
|
val x = A.Y.ordinal
|
||||||
@@ -9,7 +9,7 @@ enum class A(val z: Any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum class B(val z: Any) {
|
enum class B(val z: Any) {
|
||||||
Y(<!UNINITIALIZED_ENUM_COMPANION_WARNING!>B<!>.x);
|
Y(<!UNINITIALIZED_ENUM_COMPANION!>B<!>.x);
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val x = B.Y.ordinal
|
val x = B.Y.ordinal
|
||||||
|
|||||||
+4
-4
@@ -9,7 +9,7 @@ enum class B(val x: Int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum class C(val x: Int) {
|
enum class C(val x: Int) {
|
||||||
C1(<!UNINITIALIZED_ENUM_COMPANION_WARNING, UNINITIALIZED_VARIABLE!>SUM<!>),
|
C1(<!UNINITIALIZED_ENUM_COMPANION, UNINITIALIZED_VARIABLE!>SUM<!>),
|
||||||
C2(1);
|
C2(1);
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@@ -32,8 +32,8 @@ enum class Fruit(personal: Int) {
|
|||||||
|
|
||||||
// Another example from KT-11769
|
// Another example from KT-11769
|
||||||
enum class EnumCompanion1(val x: Int) {
|
enum class EnumCompanion1(val x: Int) {
|
||||||
INSTANCE(<!UNINITIALIZED_ENUM_COMPANION, UNINITIALIZED_ENUM_COMPANION_WARNING!>Companion<!>.foo()),
|
INSTANCE(<!UNINITIALIZED_ENUM_COMPANION!>Companion<!>.foo()),
|
||||||
ANOTHER(<!UNINITIALIZED_ENUM_COMPANION_WARNING!>foo()<!>);
|
ANOTHER(<!UNINITIALIZED_ENUM_COMPANION!>foo()<!>);
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun foo() = 42
|
fun foo() = 42
|
||||||
@@ -41,7 +41,7 @@ enum class EnumCompanion1(val x: Int) {
|
|||||||
}
|
}
|
||||||
// Also should be reported for implicit receiver
|
// Also should be reported for implicit receiver
|
||||||
enum class EnumCompanion2(val x: Int) {
|
enum class EnumCompanion2(val x: Int) {
|
||||||
INSTANCE(<!UNINITIALIZED_ENUM_COMPANION_WARNING!><!UNINITIALIZED_ENUM_COMPANION!>foo<!>()<!>);
|
INSTANCE(<!UNINITIALIZED_ENUM_COMPANION!>foo()<!>);
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun foo() = 42
|
fun foo() = 42
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
object DelegateTest {
|
object DelegateTest {
|
||||||
var result = ""
|
var result = ""
|
||||||
val f by lazy {
|
val f by lazy {
|
||||||
result += <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING!>f<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>toString<!>() // Compiler crash
|
result += <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>f<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>toString<!>() // Compiler crash
|
||||||
"hello"
|
"hello"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ object DelegateTest {
|
|||||||
object DelegateTest2 {
|
object DelegateTest2 {
|
||||||
var result = ""
|
var result = ""
|
||||||
val f by lazy {
|
val f by lazy {
|
||||||
result += <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING!>f<!>
|
result += <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>f<!>
|
||||||
"hello"
|
"hello"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
|
|
||||||
val a by <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING!>a<!>
|
val a by <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>a<!>
|
||||||
|
|
||||||
val b by Delegate(<!DEBUG_INFO_MISSING_UNRESOLVED, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>b<!>)
|
val b by Delegate(<!DEBUG_INFO_MISSING_UNRESOLVED, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>b<!>)
|
||||||
|
|
||||||
val c by <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, UNINITIALIZED_VARIABLE!>d<!>
|
val c by <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, UNINITIALIZED_VARIABLE!>d<!>
|
||||||
val d by <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING!>c<!>
|
val d by <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>c<!>
|
||||||
|
|
||||||
class Delegate(i: Int) {
|
class Delegate(i: Int) {
|
||||||
operator fun getValue(t: Any?, p: KProperty<*>): Int {
|
operator fun getValue(t: Any?, p: KProperty<*>): Int {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
object DelegateTest {
|
object DelegateTest {
|
||||||
var result = ""
|
var result = ""
|
||||||
val f by lazy {
|
val f by lazy {
|
||||||
result += <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING!>f<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>toString<!>() // Compiler crash
|
result += <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>f<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>toString<!>() // Compiler crash
|
||||||
"hello"
|
"hello"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
package typeReferenceError
|
package typeReferenceError
|
||||||
|
|
||||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class Pair<!><<!SYNTAX!><!>:(<!UNSUPPORTED!>val<!> <!UNSUPPORTED!>c<!>: <!SYNTAX!><!SYNTAX!><!>fun<!><!SYNTAX!><!> <!UNRESOLVED_REFERENCE!>main<!><!NO_CONSTRUCTOR_WARNING!>()<!>
|
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class Pair<!><<!SYNTAX!><!>:(<!UNSUPPORTED!>val<!> <!UNSUPPORTED!>c<!>: <!SYNTAX!><!SYNTAX!><!>fun<!><!SYNTAX!><!> <!UNRESOLVED_REFERENCE!>main<!><!NO_CONSTRUCTOR!>()<!>
|
||||||
|
|||||||
+2
-10
@@ -1,12 +1,4 @@
|
|||||||
/kt47986Default.kt:4:18: warning: parameter 'builderAction' is never used
|
/kt47986Default.kt:10:13: error: not enough information to infer type variable K
|
||||||
fun <K> buildFoo(builderAction: Foo<K>.() -> Unit): Foo<K> = Foo()
|
|
||||||
^
|
|
||||||
/kt47986Default.kt:6:20: warning: parameter 'x' is never used
|
|
||||||
fun <K> Foo<K>.bar(x: Int = 1) {}
|
|
||||||
^
|
|
||||||
/kt47986Default.kt:9:9: warning: variable 'x' is never used
|
|
||||||
val x = buildFoo {
|
|
||||||
^
|
|
||||||
/kt47986Default.kt:9:13: warning: type parameter for a type argument K can't be inferred into declared upper bounds. Please provide any use-site type information. It will become an error in future releases.
|
|
||||||
val x = buildFoo {
|
val x = buildFoo {
|
||||||
^
|
^
|
||||||
|
|
||||||
|
|||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
|
||||||
class Foo<K>
|
|
||||||
|
|
||||||
fun <K> buildFoo(builderAction: Foo<K>.() -> Unit): Foo<K> = Foo()
|
|
||||||
|
|
||||||
fun <K> Foo<K>.bar(x: Int = 1) {}
|
|
||||||
|
|
||||||
fun main() {
|
|
||||||
val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildFoo<!> {
|
|
||||||
bar()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+2
-1
@@ -1,3 +1,4 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||||
class Foo<K>
|
class Foo<K>
|
||||||
|
|
||||||
@@ -6,7 +7,7 @@ fun <K> buildFoo(builderAction: Foo<K>.() -> Unit): Foo<K> = Foo()
|
|||||||
fun <K> Foo<K>.bar(x: Int = 1) {}
|
fun <K> Foo<K>.bar(x: Int = 1) {}
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
val x = <!INFERRED_INTO_DECLARED_UPPER_BOUNDS!>buildFoo<!> {
|
val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildFoo<!> {
|
||||||
bar()
|
bar()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-10
@@ -1,12 +1,4 @@
|
|||||||
/kt47986_2.kt:4:18: warning: parameter 'builderAction' is never used
|
/kt47986_2.kt:12:13: error: not enough information to infer type variable K
|
||||||
fun <K> buildFoo(builderAction: Foo<K>.() -> Unit): Foo<K> = Foo()
|
|
||||||
^
|
|
||||||
/kt47986_2.kt:11:9: warning: variable 'x' is never used
|
|
||||||
val x = buildFoo { // can't infer
|
|
||||||
^
|
|
||||||
/kt47986_2.kt:11:13: warning: type parameter for a type argument K can't be inferred into declared upper bounds. Please provide any use-site type information. It will become an error in future releases.
|
|
||||||
val x = buildFoo { // can't infer
|
val x = buildFoo { // can't infer
|
||||||
^
|
^
|
||||||
/kt47986_2.kt:12:13: warning: variable 'y' is never used
|
|
||||||
val y = id(::bar)
|
|
||||||
^
|
|
||||||
|
|||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
|
||||||
class Foo<K>
|
|
||||||
|
|
||||||
fun <K> buildFoo(builderAction: Foo<K>.() -> Unit): Foo<K> = Foo()
|
|
||||||
|
|
||||||
fun <L> Foo<L>.bar() {}
|
|
||||||
|
|
||||||
fun <K> id(x: K) = x
|
|
||||||
|
|
||||||
fun main() {
|
|
||||||
val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildFoo<!> { // can't infer
|
|
||||||
val y = id(::bar)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+3
-2
@@ -1,3 +1,4 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||||
class Foo<K>
|
class Foo<K>
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ fun <L> Foo<L>.bar() {}
|
|||||||
fun <K> id(x: K) = x
|
fun <K> id(x: K) = x
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
val x = <!INFERRED_INTO_DECLARED_UPPER_BOUNDS!>buildFoo<!> { // can't infer
|
val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildFoo<!> { // can't infer
|
||||||
val y = id(::bar)
|
val y = id(::bar)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-10
@@ -1,12 +1,4 @@
|
|||||||
/kt47986_3.kt:4:18: warning: parameter 'builderAction' is never used
|
/kt47986_3.kt:10:13: error: not enough information to infer type variable K
|
||||||
fun <K> buildFoo(builderAction: Foo<K>.() -> Unit): Foo<K> = Foo()
|
|
||||||
^
|
|
||||||
/kt47986_3.kt:6:26: warning: parameter 'x' is never used
|
|
||||||
fun <K: N, N> Foo<K>.bar(x: Int = 1) {}
|
|
||||||
^
|
|
||||||
/kt47986_3.kt:9:9: warning: variable 'x' is never used
|
|
||||||
val x = buildFoo {
|
|
||||||
^
|
|
||||||
/kt47986_3.kt:9:13: warning: type parameter for a type argument K can't be inferred into declared upper bounds. Please provide any use-site type information. It will become an error in future releases.
|
|
||||||
val x = buildFoo {
|
val x = buildFoo {
|
||||||
^
|
^
|
||||||
|
|
||||||
|
|||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
|
||||||
class Foo<K>
|
|
||||||
|
|
||||||
fun <K> buildFoo(builderAction: Foo<K>.() -> Unit): Foo<K> = Foo()
|
|
||||||
|
|
||||||
fun <K: N, N> Foo<K>.bar(x: Int = 1) {}
|
|
||||||
|
|
||||||
fun main() {
|
|
||||||
val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildFoo<!> {
|
|
||||||
bar()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+2
-1
@@ -1,3 +1,4 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||||
class Foo<K>
|
class Foo<K>
|
||||||
|
|
||||||
@@ -6,7 +7,7 @@ fun <K> buildFoo(builderAction: Foo<K>.() -> Unit): Foo<K> = Foo()
|
|||||||
fun <K: N, N> Foo<K>.bar(x: Int = 1) {}
|
fun <K: N, N> Foo<K>.bar(x: Int = 1) {}
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
val x = <!INFERRED_INTO_DECLARED_UPPER_BOUNDS!>buildFoo<!> {
|
val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildFoo<!> {
|
||||||
bar()
|
bar()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user