Use getter names for $annotations methods in most codegen tests

This is needed to update master to 1.4, while still testing the latest
compiler by default. Also add one test on the old behavior.
This commit is contained in:
Alexander Udalov
2019-12-27 15:59:03 +01:00
parent 330dd789de
commit e2a42446ed
20 changed files with 63 additions and 33 deletions
@@ -1,4 +1,5 @@
// !JVM_DEFAULT_MODE: compatibility
// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
// JVM_TARGET: 1.8
// WITH_RUNTIME
@@ -12,9 +13,9 @@ interface Test {
}
// TESTED_OBJECT_KIND: function
// TESTED_OBJECTS: Test, test$annotations
// TESTED_OBJECTS: Test, getTest$annotations
// ABSENT: TRUE
// TESTED_OBJECT_KIND: function
// TESTED_OBJECTS: Test$DefaultImpls, test$annotations
// TESTED_OBJECTS: Test$DefaultImpls, getTest$annotations
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC, ACC_DEPRECATED
@@ -1,4 +1,5 @@
// !JVM_DEFAULT_MODE: enable
// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
// JVM_TARGET: 1.8
// WITH_RUNTIME
@@ -14,9 +15,9 @@ interface Test {
}
// TESTED_OBJECT_KIND: function
// TESTED_OBJECTS: Test, test$annotations
// TESTED_OBJECTS: Test, getTest$annotations
// ABSENT: TRUE
// TESTED_OBJECT_KIND: function
// TESTED_OBJECTS: Test$DefaultImpls, test$annotations
// TESTED_OBJECTS: Test$DefaultImpls, getTest$annotations
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC, ACC_DEPRECATED
@@ -0,0 +1,12 @@
// !LANGUAGE: -UseGetterNameForPropertyAnnotationsMethodOnJvm
class Foo {
annotation class Anno
@Anno
val prop = 42
}
// TESTED_OBJECT_KIND: function
// TESTED_OBJECTS: Foo, prop$annotations
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PUBLIC
@@ -1,3 +1,5 @@
// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
class Foo {
annotation class Anno
@@ -6,5 +8,5 @@ class Foo {
}
// TESTED_OBJECT_KIND: function
// TESTED_OBJECTS: Foo, prop$annotations
// TESTED_OBJECTS: Foo, getProp$annotations
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PRIVATE
@@ -1,3 +1,5 @@
// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
open class Foo {
annotation class Anno
@@ -6,5 +8,5 @@ open class Foo {
}
// TESTED_OBJECT_KIND: function
// TESTED_OBJECTS: Foo, prop$annotations
// TESTED_OBJECTS: Foo, getProp$annotations
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PROTECTED
@@ -1,3 +1,5 @@
// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
class Foo {
annotation class Anno
@@ -6,5 +8,5 @@ class Foo {
}
// TESTED_OBJECT_KIND: function
// TESTED_OBJECTS: Foo, prop$annotations
// TESTED_OBJECTS: Foo, getProp$annotations
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PUBLIC