TEST: companion and init0 tests
(cherry picked from commit f8e80249e9f986ae58a52a57173d2cb0b68a653b)
This commit is contained in:
committed by
vvlevchenko
parent
8496a0f2a9
commit
4717e99ac2
@@ -0,0 +1,5 @@
|
|||||||
|
class A {
|
||||||
|
companion object {
|
||||||
|
fun foo() = "comp"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
class A(a:Int) {
|
||||||
|
var i:Int = 0
|
||||||
|
init {
|
||||||
|
if (a == 0) i = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user