mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Instance field generation in objects
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import B
|
||||
|
||||
object A {
|
||||
val c = 1
|
||||
fun foo() = 4
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return if (B.a == 1 && B.b == 4) "OK" else "${B.a} ${B.b}"
|
||||
}
|
||||
Reference in New Issue
Block a user