TEST: companion and init0 tests

(cherry picked from commit f8e80249e9f986ae58a52a57173d2cb0b68a653b)
This commit is contained in:
Konstantin Anisimov
2016-11-25 18:10:15 +03:00
committed by vvlevchenko
parent 8496a0f2a9
commit 4717e99ac2
2 changed files with 11 additions and 0 deletions
@@ -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
}
}