Test for evaluating properties lazily
This commit is contained in:
@@ -144,6 +144,9 @@ public final class MiscTest extends AbstractExpressionTest {
|
|||||||
fooBoxTest();
|
fooBoxTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testLazyPropertyGetterNotCalledOnStart() throws Exception {
|
||||||
|
checkOutput("lazyProperty.kt", "Hello, world! Gotcha 3");
|
||||||
|
}
|
||||||
|
|
||||||
public void testExclExclThrows() throws Exception {
|
public void testExclExclThrows() throws Exception {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fun main(args : Array<String>) {
|
||||||
|
println("Hello, world!")
|
||||||
|
println(p)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
val p: Int
|
||||||
|
get() {
|
||||||
|
println("Gotcha")
|
||||||
|
return 3
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user