From d87592da76eb555f0e3fc3732169e56b1852fba1 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 19 Sep 2012 19:02:43 +0200 Subject: Disabled failing build manager tests. When the refined build manager computes its change sets it mixes up the types. It computes constructors of inner classes of the first compilation that point to types of the second compilation. This breaks a useful assertion in ExtensionMethods. The error you get for t4245 is java.lang.AssertionError: assertion failed: unexpected constructor erasure A#6956.this.B#20211 for class B#6963 What goes on here is that the primary constructor of inner class B#6963 points to the new version of that inner class A#6956.this.B#20211. This happens during the computation of change sets, not during normal compilation. Since it looks like the computation of change sets is broken I have disabled the tests, rather than disabling the assertion. It seems that during residential compilation, the result type of a constructor can be a different version of the enclosing class. I could not reproduce this --- test/files/buildmanager/overloaded_1/A.scala | 11 ----------- test/files/buildmanager/overloaded_1/overloaded_1.check | 6 ------ test/files/buildmanager/overloaded_1/overloaded_1.test | 2 -- test/files/buildmanager/t4245/A.scala | 3 --- test/files/buildmanager/t4245/t4245.check | 6 ------ test/files/buildmanager/t4245/t4245.test | 2 -- test/files/disabled/A.scala | 11 +++++++++++ test/files/disabled/overloaded_1.check | 6 ++++++ test/files/disabled/overloaded_1.test | 2 ++ test/files/disabled/t4245/A.scala | 3 +++ test/files/disabled/t4245/t4245.check | 6 ++++++ test/files/disabled/t4245/t4245.test | 2 ++ 12 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 test/files/buildmanager/overloaded_1/A.scala delete mode 100644 test/files/buildmanager/overloaded_1/overloaded_1.check delete mode 100644 test/files/buildmanager/overloaded_1/overloaded_1.test delete mode 100644 test/files/buildmanager/t4245/A.scala delete mode 100644 test/files/buildmanager/t4245/t4245.check delete mode 100644 test/files/buildmanager/t4245/t4245.test create mode 100644 test/files/disabled/A.scala create mode 100644 test/files/disabled/overloaded_1.check create mode 100644 test/files/disabled/overloaded_1.test create mode 100644 test/files/disabled/t4245/A.scala create mode 100644 test/files/disabled/t4245/t4245.check create mode 100644 test/files/disabled/t4245/t4245.test (limited to 'test/files') diff --git a/test/files/buildmanager/overloaded_1/A.scala b/test/files/buildmanager/overloaded_1/A.scala deleted file mode 100644 index 33b63b8006..0000000000 --- a/test/files/buildmanager/overloaded_1/A.scala +++ /dev/null @@ -1,11 +0,0 @@ -trait As { - trait C extends D { - override def foo = this /// Shouldn't cause the change - override def foo(act: List[D]) = this - } - - abstract class D{ - def foo: D = this - def foo(act: List[D]) = this - } -} diff --git a/test/files/buildmanager/overloaded_1/overloaded_1.check b/test/files/buildmanager/overloaded_1/overloaded_1.check deleted file mode 100644 index 4d643ce6b4..0000000000 --- a/test/files/buildmanager/overloaded_1/overloaded_1.check +++ /dev/null @@ -1,6 +0,0 @@ -builder > A.scala -compiling Set(A.scala) -Changes: Map() -builder > A.scala -compiling Set(A.scala) -Changes: Map(class As$D -> List(), object As$C$class -> List(), object As$class -> List(), trait As -> List(), trait As$C -> List()) diff --git a/test/files/buildmanager/overloaded_1/overloaded_1.test b/test/files/buildmanager/overloaded_1/overloaded_1.test deleted file mode 100644 index 392e0d365f..0000000000 --- a/test/files/buildmanager/overloaded_1/overloaded_1.test +++ /dev/null @@ -1,2 +0,0 @@ ->>compile A.scala ->>compile A.scala diff --git a/test/files/buildmanager/t4245/A.scala b/test/files/buildmanager/t4245/A.scala deleted file mode 100644 index 7c4efe1b4b..0000000000 --- a/test/files/buildmanager/t4245/A.scala +++ /dev/null @@ -1,3 +0,0 @@ -class A { - class B(val a: Int) -} diff --git a/test/files/buildmanager/t4245/t4245.check b/test/files/buildmanager/t4245/t4245.check deleted file mode 100644 index 3d3898c671..0000000000 --- a/test/files/buildmanager/t4245/t4245.check +++ /dev/null @@ -1,6 +0,0 @@ -builder > A.scala -compiling Set(A.scala) -Changes: Map() -builder > A.scala -compiling Set(A.scala) -Changes: Map(class A -> List(), class A$B -> List()) diff --git a/test/files/buildmanager/t4245/t4245.test b/test/files/buildmanager/t4245/t4245.test deleted file mode 100644 index 392e0d365f..0000000000 --- a/test/files/buildmanager/t4245/t4245.test +++ /dev/null @@ -1,2 +0,0 @@ ->>compile A.scala ->>compile A.scala diff --git a/test/files/disabled/A.scala b/test/files/disabled/A.scala new file mode 100644 index 0000000000..c070faf978 --- /dev/null +++ b/test/files/disabled/A.scala @@ -0,0 +1,11 @@ +trait As { + trait C extends D { + override def foo = this /// Shouldn't cause the change + override def foo(act: List[D]) = this + } + + abstract class D{ + def foo: D = this + def foo(act: List[D]) = this + } +} diff --git a/test/files/disabled/overloaded_1.check b/test/files/disabled/overloaded_1.check new file mode 100644 index 0000000000..4d643ce6b4 --- /dev/null +++ b/test/files/disabled/overloaded_1.check @@ -0,0 +1,6 @@ +builder > A.scala +compiling Set(A.scala) +Changes: Map() +builder > A.scala +compiling Set(A.scala) +Changes: Map(class As$D -> List(), object As$C$class -> List(), object As$class -> List(), trait As -> List(), trait As$C -> List()) diff --git a/test/files/disabled/overloaded_1.test b/test/files/disabled/overloaded_1.test new file mode 100644 index 0000000000..392e0d365f --- /dev/null +++ b/test/files/disabled/overloaded_1.test @@ -0,0 +1,2 @@ +>>compile A.scala +>>compile A.scala diff --git a/test/files/disabled/t4245/A.scala b/test/files/disabled/t4245/A.scala new file mode 100644 index 0000000000..7c4efe1b4b --- /dev/null +++ b/test/files/disabled/t4245/A.scala @@ -0,0 +1,3 @@ +class A { + class B(val a: Int) +} diff --git a/test/files/disabled/t4245/t4245.check b/test/files/disabled/t4245/t4245.check new file mode 100644 index 0000000000..3d3898c671 --- /dev/null +++ b/test/files/disabled/t4245/t4245.check @@ -0,0 +1,6 @@ +builder > A.scala +compiling Set(A.scala) +Changes: Map() +builder > A.scala +compiling Set(A.scala) +Changes: Map(class A -> List(), class A$B -> List()) diff --git a/test/files/disabled/t4245/t4245.test b/test/files/disabled/t4245/t4245.test new file mode 100644 index 0000000000..392e0d365f --- /dev/null +++ b/test/files/disabled/t4245/t4245.test @@ -0,0 +1,2 @@ +>>compile A.scala +>>compile A.scala -- cgit v1.2.3