Test for evaluating properties lazily

This commit is contained in:
pTalanov
2012-06-05 21:53:53 +04:00
parent 601007c20f
commit 1937823a77
2 changed files with 14 additions and 0 deletions
@@ -144,6 +144,9 @@ public final class MiscTest extends AbstractExpressionTest {
fooBoxTest();
}
public void testLazyPropertyGetterNotCalledOnStart() throws Exception {
checkOutput("lazyProperty.kt", "Hello, world! Gotcha 3");
}
public void testExclExclThrows() throws Exception {
try {
@@ -0,0 +1,11 @@
fun main(args : Array<String>) {
println("Hello, world!")
println(p)
}
val p: Int
get() {
println("Gotcha")
return 3
}