diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java index 9828978cd3a..f98cf55b87e 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java @@ -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 { diff --git a/js/js.translator/testFiles/expression/misc/cases/lazyProperty.kt b/js/js.translator/testFiles/expression/misc/cases/lazyProperty.kt new file mode 100644 index 00000000000..16eae2156bf --- /dev/null +++ b/js/js.translator/testFiles/expression/misc/cases/lazyProperty.kt @@ -0,0 +1,11 @@ +fun main(args : Array) { + println("Hello, world!") + println(p) +} + + +val p: Int +get() { + println("Gotcha") + return 3 +} \ No newline at end of file