diff options
author | Martin Odersky <odersky@gmail.com> | 2015-06-19 23:12:46 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-06-19 23:12:57 +0200 |
commit | 9bf44f867c1a9f4625dd7fac9575c3e74373402b (patch) | |
tree | f60948565b2200e3d93dc0873fcdd0a279ee1f0c /tests/pending | |
parent | f3a676a33e075b93d99689f26e76632e57a4d8c3 (diff) | |
download | dotty-9bf44f867c1a9f4625dd7fac9575c3e74373402b.tar.gz dotty-9bf44f867c1a9f4625dd7fac9575c3e74373402b.tar.bz2 dotty-9bf44f867c1a9f4625dd7fac9575c3e74373402b.zip |
Map outer accessors to outer paramaters
Map references to outer accessors in secondary constructors to outer parameters. This
was the second source of "reference to this before super call" errors.
Diffstat (limited to 'tests/pending')
-rw-r--r-- | tests/pending/run/constructors.check | 5 | ||||
-rw-r--r-- | tests/pending/run/constructors.scala | 27 |
2 files changed, 0 insertions, 32 deletions
diff --git a/tests/pending/run/constructors.check b/tests/pending/run/constructors.check deleted file mode 100644 index 0743b7e29..000000000 --- a/tests/pending/run/constructors.check +++ /dev/null @@ -1,5 +0,0 @@ -x=1 y=2 -x=3 y=3 -x=1 y=1 -x=1 y=2 a=1 b=2 c=a -x=3 y=3 a=3 b=3 c=b diff --git a/tests/pending/run/constructors.scala b/tests/pending/run/constructors.scala deleted file mode 100644 index 90926431f..000000000 --- a/tests/pending/run/constructors.scala +++ /dev/null @@ -1,27 +0,0 @@ -// Test constructors, including multiple ones. - -class A(x: Int, y: Int) { - def this(x: Int) = this(x, x); - def this() = this(1); - override def toString() = "x=" + x + " y=" + y; - class B(a: Int, b: Int, c: String) { - def this(str: String) = this(x, y, str); - override def toString() = - "x=" + x + " y=" + y + " a=" + a + " b=" + b + " c=" + c; - } -} - -object Test { - def main(args: Array[String]): Unit = { - val a1 = new A(1,2); - val a2 = new A(3); - val a3 = new A(); - val b1 = new a1.B(1,2,"a"); - val b2 = new a2.B("b"); - Console.println(a1); - Console.println(a2); - Console.println(a3); - Console.println(b1); - Console.println(b2); - } -} |