From 2885eb0b2d49c33c707cecd2ee7b9588fe3f76ab Mon Sep 17 00:00:00 2001 From: Eugene Vigdorchik Date: Mon, 8 Apr 2013 14:12:26 +0400 Subject: Revert "SI-6387 Clones accessor before name expansion" This reverts commit 4e10b2c833fa846c68b81e94a08d867e7de656aa. Add 6387 test to pending and 7341 to up-to-date. --- test/files/run/t6387.check | 1 - test/files/run/t6387.scala | 16 ---------------- test/files/run/t7341.check | 0 test/files/run/t7341.flags | 1 + test/files/run/t7341.scala | 15 +++++++++++++++ test/pending/run/t6387.check | 1 + test/pending/run/t6387.scala | 16 ++++++++++++++++ 7 files changed, 33 insertions(+), 17 deletions(-) delete mode 100644 test/files/run/t6387.check delete mode 100644 test/files/run/t6387.scala create mode 100644 test/files/run/t7341.check create mode 100755 test/files/run/t7341.flags create mode 100755 test/files/run/t7341.scala create mode 100644 test/pending/run/t6387.check create mode 100644 test/pending/run/t6387.scala (limited to 'test') diff --git a/test/files/run/t6387.check b/test/files/run/t6387.check deleted file mode 100644 index 83b33d238d..0000000000 --- a/test/files/run/t6387.check +++ /dev/null @@ -1 +0,0 @@ -1000 diff --git a/test/files/run/t6387.scala b/test/files/run/t6387.scala deleted file mode 100644 index bbebb5f511..0000000000 --- a/test/files/run/t6387.scala +++ /dev/null @@ -1,16 +0,0 @@ -trait A { - def foo: Long -} - -object Test { - def a(): A = new A { - var foo: Long = 1000L - - val test = () => { - foo = 28 - } - } - def main(args: Array[String]) { - println(a().foo) - } -} diff --git a/test/files/run/t7341.check b/test/files/run/t7341.check new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/files/run/t7341.flags b/test/files/run/t7341.flags new file mode 100755 index 0000000000..ae08446055 --- /dev/null +++ b/test/files/run/t7341.flags @@ -0,0 +1 @@ +-Xcheckinit \ No newline at end of file diff --git a/test/files/run/t7341.scala b/test/files/run/t7341.scala new file mode 100755 index 0000000000..dc526c6c19 --- /dev/null +++ b/test/files/run/t7341.scala @@ -0,0 +1,15 @@ +object Obj { + private var cache: Any = () + def returning(f: () => Unit) = () + def foo { + returning(() => cache = ()) + } + + def apply(): Any = { + cache + } +} + +object Test extends App { + Obj() +} diff --git a/test/pending/run/t6387.check b/test/pending/run/t6387.check new file mode 100644 index 0000000000..83b33d238d --- /dev/null +++ b/test/pending/run/t6387.check @@ -0,0 +1 @@ +1000 diff --git a/test/pending/run/t6387.scala b/test/pending/run/t6387.scala new file mode 100644 index 0000000000..bbebb5f511 --- /dev/null +++ b/test/pending/run/t6387.scala @@ -0,0 +1,16 @@ +trait A { + def foo: Long +} + +object Test { + def a(): A = new A { + var foo: Long = 1000L + + val test = () => { + foo = 28 + } + } + def main(args: Array[String]) { + println(a().foo) + } +} -- cgit v1.2.3