Restructure bytecode listing tests on InlineOnly/inline+reified
This commit is contained in:
+2
-5
@@ -4,14 +4,11 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
inlineOnly<String>()
|
inlineOnly()
|
||||||
inlineOnlyAnnotated()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// No method should be generated in multifile facade for 'inlineOnly'
|
// No method should be generated in multifile facade for 'inlineOnly'
|
||||||
// Because 'inlineOnly' is private in file part (because it's inline-only) and can't be delegated from facade
|
// Because 'inlineOnly' is private in file part (because it's inline-only) and can't be delegated from facade
|
||||||
public inline fun <reified T> inlineOnly() {}
|
|
||||||
|
|
||||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
inline fun inlineOnlyAnnotated() { }
|
inline fun inlineOnly() { }
|
||||||
+1
-2
@@ -6,6 +6,5 @@ public final class test/Foo {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
synthetic final class test/Foo__InlineOnlyMultifileKt {
|
synthetic final class test/Foo__InlineOnlyMultifileKt {
|
||||||
public final static method foo(): void
|
public final static method foo(): void
|
||||||
private final static method inlineOnly(): void
|
private final static @kotlin.internal.InlineOnly method inlineOnly(): void
|
||||||
private final static @kotlin.internal.InlineOnly method inlineOnlyAnnotated(): void
|
|
||||||
}
|
}
|
||||||
-4
@@ -5,7 +5,6 @@ package test
|
|||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
prop
|
prop
|
||||||
"".extProp
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// No method should be generated in multifile facade for 'inlineOnly'
|
// No method should be generated in multifile facade for 'inlineOnly'
|
||||||
@@ -15,6 +14,3 @@ fun foo() {
|
|||||||
inline var prop: String
|
inline var prop: String
|
||||||
get() = "12"
|
get() = "12"
|
||||||
set(value) {}
|
set(value) {}
|
||||||
|
|
||||||
inline val <reified Z> Z.extProp: String
|
|
||||||
get() = "123"
|
|
||||||
-1
@@ -6,7 +6,6 @@ public final class test/Foo {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
synthetic final class test/Foo__InlineOnlyPropertyMultifileKt {
|
synthetic final class test/Foo__InlineOnlyPropertyMultifileKt {
|
||||||
public final static method foo(): void
|
public final static method foo(): void
|
||||||
private final static method getExtProp(p0: java.lang.Object): java.lang.String
|
|
||||||
private final static method getProp(): java.lang.String
|
private final static method getProp(): java.lang.String
|
||||||
public synthetic deprecated static @kotlin.internal.InlineOnly method prop$annotations(): void
|
public synthetic deprecated static @kotlin.internal.InlineOnly method prop$annotations(): void
|
||||||
private final static method setProp(p0: java.lang.String): void
|
private final static method setProp(p0: java.lang.String): void
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
@file:[JvmName("Foo") JvmMultifileClass]
|
||||||
|
package test
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
inlineReified<String>()
|
||||||
|
}
|
||||||
|
|
||||||
|
public inline fun <reified T> inlineReified() {}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public final class test/Foo {
|
||||||
|
public final static method foo(): void
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
synthetic final class test/Foo__InlineReifiedMultifileKt {
|
||||||
|
public final static method foo(): void
|
||||||
|
private final static method inlineReified(): void
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
@file:[JvmName("Foo") JvmMultifileClass]
|
||||||
|
package test
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
"".extProp
|
||||||
|
}
|
||||||
|
|
||||||
|
inline val <reified Z> Z.extProp: String
|
||||||
|
get() = "123"
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public final class test/Foo {
|
||||||
|
public final static method foo(): void
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
synthetic final class test/Foo__InlineReifiedPropertyMultifileKt {
|
||||||
|
public final static method foo(): void
|
||||||
|
private final static method getExtProp(p0: java.lang.Object): java.lang.String
|
||||||
|
}
|
||||||
-8
@@ -4,16 +4,8 @@
|
|||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
inline fun foo() { }
|
inline fun foo() { }
|
||||||
|
|
||||||
inline fun <T> bar() { }
|
|
||||||
|
|
||||||
inline fun <U, reified V> baz() {}
|
|
||||||
|
|
||||||
class Foo {
|
class Foo {
|
||||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
inline fun foo() { }
|
inline fun foo() { }
|
||||||
|
|
||||||
inline fun <T> bar() { }
|
|
||||||
|
|
||||||
inline fun <U, reified V> baz() {}
|
|
||||||
}
|
}
|
||||||
-4
@@ -1,14 +1,10 @@
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class Foo {
|
public final class Foo {
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
public final method bar(): void
|
|
||||||
private final method baz(): void
|
|
||||||
private final @kotlin.internal.InlineOnly method foo(): void
|
private final @kotlin.internal.InlineOnly method foo(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class InlineOnlyKt {
|
public final class InlineOnlyKt {
|
||||||
public final static method bar(): void
|
|
||||||
private final static method baz(): void
|
|
||||||
private final static @kotlin.internal.InlineOnly method foo(): void
|
private final static @kotlin.internal.InlineOnly method foo(): void
|
||||||
}
|
}
|
||||||
-10
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
@@ -14,11 +13,7 @@ inline var prop2: String
|
|||||||
set(value) {}
|
set(value) {}
|
||||||
|
|
||||||
|
|
||||||
inline val <reified Z> Z.extProp: String
|
|
||||||
get() = "123"
|
|
||||||
|
|
||||||
class Foo {
|
class Foo {
|
||||||
|
|
||||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
inline var prop: String
|
inline var prop: String
|
||||||
@@ -30,9 +25,4 @@ class Foo {
|
|||||||
@kotlin.internal.InlineOnly
|
@kotlin.internal.InlineOnly
|
||||||
get() = "12"
|
get() = "12"
|
||||||
set(value) {}
|
set(value) {}
|
||||||
|
|
||||||
|
|
||||||
inline val <reified Z> Z.extProp: String
|
|
||||||
get() = "123"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
-2
@@ -1,7 +1,6 @@
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class Foo {
|
public final class Foo {
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
private final method getExtProp(p0: java.lang.Object): java.lang.String
|
|
||||||
private final method getProp(): java.lang.String
|
private final method getProp(): java.lang.String
|
||||||
private final @kotlin.internal.InlineOnly method getProp2(): java.lang.String
|
private final @kotlin.internal.InlineOnly method getProp2(): java.lang.String
|
||||||
public synthetic deprecated static @kotlin.internal.InlineOnly method prop$annotations(): void
|
public synthetic deprecated static @kotlin.internal.InlineOnly method prop$annotations(): void
|
||||||
@@ -11,7 +10,6 @@ public final class Foo {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class InlineOnlyPropertyKt {
|
public final class InlineOnlyPropertyKt {
|
||||||
private final static method getExtProp(p0: java.lang.Object): java.lang.String
|
|
||||||
private final static method getProp(): java.lang.String
|
private final static method getProp(): java.lang.String
|
||||||
private final static @kotlin.internal.InlineOnly method getProp2(): java.lang.String
|
private final static @kotlin.internal.InlineOnly method getProp2(): java.lang.String
|
||||||
public synthetic deprecated static @kotlin.internal.InlineOnly method prop$annotations(): void
|
public synthetic deprecated static @kotlin.internal.InlineOnly method prop$annotations(): void
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
inline fun <T> bar() { }
|
||||||
|
|
||||||
|
inline fun <U, reified V> baz() {}
|
||||||
|
|
||||||
|
class Foo {
|
||||||
|
inline fun <T> bar() { }
|
||||||
|
|
||||||
|
inline fun <U, reified V> baz() {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public final class Foo {
|
||||||
|
public method <init>(): void
|
||||||
|
public final method bar(): void
|
||||||
|
private final method baz(): void
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class InlineReifiedKt {
|
||||||
|
public final static method bar(): void
|
||||||
|
private final static method baz(): void
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
inline val <reified Z> Z.extProp: String
|
||||||
|
get() = "123"
|
||||||
|
|
||||||
|
class Foo {
|
||||||
|
inline val <reified Z> Z.extProp: String
|
||||||
|
get() = "456"
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public final class Foo {
|
||||||
|
public method <init>(): void
|
||||||
|
private final method getExtProp(p0: java.lang.Object): java.lang.String
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class InlineReifiedPropertyKt {
|
||||||
|
private final static method getExtProp(p0: java.lang.Object): java.lang.String
|
||||||
|
}
|
||||||
+40
-20
@@ -88,26 +88,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeListing/immutableCollection.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/immutableCollection.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineOnly.kt")
|
|
||||||
public void testInlineOnly() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/inlineOnly.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("InlineOnlyMultifile.kt")
|
|
||||||
public void testInlineOnlyMultifile() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/InlineOnlyMultifile.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inlineOnlyProperty.kt")
|
|
||||||
public void testInlineOnlyProperty() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/inlineOnlyProperty.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("InlineOnlyPropertyMultifile.kt")
|
|
||||||
public void testInlineOnlyPropertyMultifile() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/InlineOnlyPropertyMultifile.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("jvmOverloadsAndParametersAnnotations.kt")
|
@TestMetadata("jvmOverloadsAndParametersAnnotations.kt")
|
||||||
public void testJvmOverloadsAndParametersAnnotations() throws Exception {
|
public void testJvmOverloadsAndParametersAnnotations() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt");
|
||||||
@@ -291,6 +271,46 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineOnly.kt")
|
||||||
|
public void testInlineOnly() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/inline/inlineOnly.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InlineOnlyMultifile.kt")
|
||||||
|
public void testInlineOnlyMultifile() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/inline/InlineOnlyMultifile.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineOnlyProperty.kt")
|
||||||
|
public void testInlineOnlyProperty() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/inline/inlineOnlyProperty.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InlineOnlyPropertyMultifile.kt")
|
||||||
|
public void testInlineOnlyPropertyMultifile() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/inline/InlineOnlyPropertyMultifile.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineReified.kt")
|
||||||
|
public void testInlineReified() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/inline/inlineReified.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InlineReifiedMultifile.kt")
|
||||||
|
public void testInlineReifiedMultifile() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/inline/InlineReifiedMultifile.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineReifiedProperty.kt")
|
||||||
|
public void testInlineReifiedProperty() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/inline/inlineReifiedProperty.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InlineReifiedPropertyMultifile.kt")
|
||||||
|
public void testInlineReifiedPropertyMultifile() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/inline/InlineReifiedPropertyMultifile.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleNamed.kt")
|
@TestMetadata("simpleNamed.kt")
|
||||||
public void testSimpleNamed() throws Exception {
|
public void testSimpleNamed() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/inline/simpleNamed.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/inline/simpleNamed.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user