From b9982a3d3d338d097fbee082c5f6778f6494f5cd Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Tue, 2 Nov 2010 00:14:58 +0000 Subject: Closes #3932, #1537. Review by extempore --- test/files/run/t1537.check | 2 ++ test/files/run/t1537.scala | 18 ++++++++++++++++++ test/files/run/t3932.check | 6 ++++++ test/files/run/t3932.scala | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 test/files/run/t1537.check create mode 100644 test/files/run/t1537.scala create mode 100644 test/files/run/t3932.check create mode 100644 test/files/run/t3932.scala (limited to 'test') diff --git a/test/files/run/t1537.check b/test/files/run/t1537.check new file mode 100644 index 0000000000..0be5d980da --- /dev/null +++ b/test/files/run/t1537.check @@ -0,0 +1,2 @@ +true +true \ No newline at end of file diff --git a/test/files/run/t1537.scala b/test/files/run/t1537.scala new file mode 100644 index 0000000000..9776f4a279 --- /dev/null +++ b/test/files/run/t1537.scala @@ -0,0 +1,18 @@ +trait Syntax { + object Foo +} + +trait Evaluation { + val syntax: Syntax + + def equalInTrait = this.syntax.Foo == this.syntax.Foo +} + +object Test extends Evaluation with Application { + object syntax extends Syntax + + def equalInObject = this.syntax.Foo == this.syntax.Foo + + println(equalInTrait) + println(equalInObject) +} diff --git a/test/files/run/t3932.check b/test/files/run/t3932.check new file mode 100644 index 0000000000..5ec39bbdeb --- /dev/null +++ b/test/files/run/t3932.check @@ -0,0 +1,6 @@ +true +true +true +true +true +true diff --git a/test/files/run/t3932.scala b/test/files/run/t3932.scala new file mode 100644 index 0000000000..f577ef8315 --- /dev/null +++ b/test/files/run/t3932.scala @@ -0,0 +1,35 @@ +class Foo + +abstract class C { + val f: Foo + def g1 = (f == f) +} +object O1 extends C { + val f = new Foo() + def g2 = (f == f) +} +object O2 extends C { + object f extends Foo + def g2 = (f == f) +} + +class O3 extends C { + object f extends Foo + def g2 = (f == f) +} + + +object Test { + def main(args: Array[String]): Unit = { + println(O1.g1) + println(O1.g2) + + println(O2.g1) + println(O2.g2) + + val o3 = new O3() + println(o3.g1) + println(o3.g2) + + } +} -- cgit v1.2.3