From 4717e99ac2fd1ff2bf39c35f0370024e673b96bd Mon Sep 17 00:00:00 2001 From: Konstantin Anisimov Date: Fri, 25 Nov 2016 18:10:15 +0300 Subject: [PATCH] TEST: companion and init0 tests (cherry picked from commit f8e80249e9f986ae58a52a57173d2cb0b68a653b) --- backend.native/tests/codegen/basics/companion.kt | 5 +++++ backend.native/tests/codegen/object/init0.kt | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 backend.native/tests/codegen/basics/companion.kt create mode 100644 backend.native/tests/codegen/object/init0.kt diff --git a/backend.native/tests/codegen/basics/companion.kt b/backend.native/tests/codegen/basics/companion.kt new file mode 100644 index 00000000000..af16718bc07 --- /dev/null +++ b/backend.native/tests/codegen/basics/companion.kt @@ -0,0 +1,5 @@ +class A { + companion object { + fun foo() = "comp" + } +} diff --git a/backend.native/tests/codegen/object/init0.kt b/backend.native/tests/codegen/object/init0.kt new file mode 100644 index 00000000000..825a4d75ee3 --- /dev/null +++ b/backend.native/tests/codegen/object/init0.kt @@ -0,0 +1,6 @@ +class A(a:Int) { + var i:Int = 0 + init { + if (a == 0) i = 1 + } +} \ No newline at end of file