mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Generate synthetic method for @JvmDefault properties in DefaultImpls
This commit is contained in:
21
compiler/testData/codegen/java8/writeFlags/defaults/compatibility/propertyAnnotation.kt
vendored
Normal file
21
compiler/testData/codegen/java8/writeFlags/defaults/compatibility/propertyAnnotation.kt
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// !API_VERSION: 1.3
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_RUNTIME
|
||||
|
||||
annotation class Property(val value: String)
|
||||
|
||||
interface Test {
|
||||
@Property("OK")
|
||||
@JvmDefault
|
||||
val test: String
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
// TESTED_OBJECT_KIND: function
|
||||
// TESTED_OBJECTS: Test, test$annotations
|
||||
// ABSENT: TRUE
|
||||
|
||||
// TESTED_OBJECT_KIND: function
|
||||
// TESTED_OBJECTS: Test$DefaultImpls, test$annotations
|
||||
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC, ACC_DEPRECATED
|
||||
23
compiler/testData/codegen/java8/writeFlags/defaults/propertyAnnotation.kt
vendored
Normal file
23
compiler/testData/codegen/java8/writeFlags/defaults/propertyAnnotation.kt
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// !API_VERSION: 1.3
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_RUNTIME
|
||||
|
||||
annotation class Property(val value: String)
|
||||
|
||||
interface Test {
|
||||
@Property("OK")
|
||||
@JvmDefault
|
||||
val test: String
|
||||
get() = "OK"
|
||||
|
||||
fun stub() {}
|
||||
}
|
||||
|
||||
// TESTED_OBJECT_KIND: function
|
||||
// TESTED_OBJECTS: Test, test$annotations
|
||||
// ABSENT: TRUE
|
||||
|
||||
// TESTED_OBJECT_KIND: function
|
||||
// TESTED_OBJECTS: Test$DefaultImpls, test$annotations
|
||||
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC, ACC_DEPRECATED
|
||||
Reference in New Issue
Block a user