Files
kotlin-fork/compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt
T
Alexander Udalov 2445d04338 Fix synthetic method generation for extension properties
If several annotated extension properties with the same name were declared in
one class, JVM issued a ClassFormatError, since we generated a synthetic method
for each of them with the same name and signature. Make the signature of this
synthetic method depend on a receiver parameter, if a property has one
2013-10-16 14:59:37 +04:00

10 lines
173 B
Kotlin

annotation class Anno
[Anno] val Int.foo: Int
get() = this
[Anno] val String.foo: Int
get() = 42
fun box() = if (42.foo == 42 && "OK".foo == 42) "OK" else "Fail"