Files
kotlin-fork/compiler/testData/codegen/box/delegatedProperty/propertyDelegatedMethod/twoPropsByOneDelegate.kt
T
2014-09-24 15:34:12 +04:00

15 lines
295 B
Kotlin

class Delegate {
var count = 0
fun get(t: Any?, p: PropertyMetadata) {}
fun propertyDelegated(vararg p: PropertyMetadata) { count++ }
}
val delegate = Delegate()
val prop1 by delegate
val prop2 by delegate
fun box(): String {
return if(delegate.count == 2) "OK" else "fail"
}