From 63c4d302527a40f92750f2275222ae96b0e72472 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 18 May 2006 16:24:52 +0000 Subject: Fixed bug 595,596,597 --- test/files/pos/bug595.scala | 5 +++++ test/files/pos/bug596.scala | 7 +++++++ test/files/resident/bug597/Main.scala | 10 ++++++++++ test/files/resident/bug597/Test.scala | 27 +++++++++++++++++++++++++++ test/files/resident/bug597/what-happened.txt | 10 ++++++++++ 5 files changed, 59 insertions(+) create mode 100755 test/files/pos/bug595.scala create mode 100755 test/files/pos/bug596.scala create mode 100644 test/files/resident/bug597/Main.scala create mode 100644 test/files/resident/bug597/Test.scala create mode 100644 test/files/resident/bug597/what-happened.txt (limited to 'test/files') diff --git a/test/files/pos/bug595.scala b/test/files/pos/bug595.scala new file mode 100755 index 0000000000..44124c90c9 --- /dev/null +++ b/test/files/pos/bug595.scala @@ -0,0 +1,5 @@ +package lampion.scala; +import _root_.scala.collection._ + +class Foo extends mutable.HashMap + diff --git a/test/files/pos/bug596.scala b/test/files/pos/bug596.scala new file mode 100755 index 0000000000..b1b5471b2f --- /dev/null +++ b/test/files/pos/bug596.scala @@ -0,0 +1,7 @@ +trait T1 { + protected abstract class C +} + +trait T2 extends T1 { + class D extends C +} diff --git a/test/files/resident/bug597/Main.scala b/test/files/resident/bug597/Main.scala new file mode 100644 index 0000000000..24d1327135 --- /dev/null +++ b/test/files/resident/bug597/Main.scala @@ -0,0 +1,10 @@ +package test; + +object Main { + def main(args : Array[String]) : Unit = { + new ExtC { + type A = Ax; + class Ax extends super.Ax; + } + } +} diff --git a/test/files/resident/bug597/Test.scala b/test/files/resident/bug597/Test.scala new file mode 100644 index 0000000000..2f63f46c3d --- /dev/null +++ b/test/files/resident/bug597/Test.scala @@ -0,0 +1,27 @@ +package test; + +abstract class Base { + type A <: Ax; + + abstract class Ax { + def a = null; + def string = "A"; + } +} +trait ExtB extends Base { + type A <: Ax; + trait Ax extends super.Ax { + def c = null; + override def string = super.string + "C"; + } +} + +trait ExtC extends /*ExtA with*/ ExtB { + type A <: Ax; + trait Ax extends super.Ax { + a + c + def d = null; + override def string = super.string + "D"; + } +} diff --git a/test/files/resident/bug597/what-happened.txt b/test/files/resident/bug597/what-happened.txt new file mode 100644 index 0000000000..52e67eda9c --- /dev/null +++ b/test/files/resident/bug597/what-happened.txt @@ -0,0 +1,10 @@ +Run in resident: + +bash-3.00$ ~/runtime-workspace/scala/dists/latest/bin/scalac -resident -d ../bin -sourcepath . + +nsc> test/Test.scala + +nsc> test/Main.scala +Exception in thread "main" java.lang.OutOfMemoryError: Java heap space + +I think there is a recursive function gone crazy somewhere. -- cgit v1.2.3