aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-06-25 22:03:01 +0200
committerMartin Odersky <odersky@gmail.com>2015-06-26 18:12:11 +0200
commit4b48243a24e533ba81149df956fdc16cdaf1460e (patch)
treeca1794cd908fa93259fa081e68f43682ed2fb4da /tests
parent5e6a9a28241ea8c64617bf90f9c331a352409035 (diff)
downloaddotty-4b48243a24e533ba81149df956fdc16cdaf1460e.tar.gz
dotty-4b48243a24e533ba81149df956fdc16cdaf1460e.tar.bz2
dotty-4b48243a24e533ba81149df956fdc16cdaf1460e.zip
Fix erasure of Thistypes.
Thistypes erased to the underlying class. This is wrong. When seen as part of some other type, a ThisType has to erase to the erasure of the underlying type (i.e. the erasure if the selftype of the class). unittest-collections.scala failed with a MethodNotFound error because the erasure was computed incorrectly. On the other hand, a tree with a ThisType type, should keep the type, analogous to a tree with a TermRef type.
Diffstat (limited to 'tests')
-rw-r--r--tests/run/unittest_collection.check (renamed from tests/pending/run/unittest_collection.check)0
-rw-r--r--tests/run/unittest_collection.scala (renamed from tests/pending/run/unittest_collection.scala)10
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/pending/run/unittest_collection.check b/tests/run/unittest_collection.check
index df1629dd7..df1629dd7 100644
--- a/tests/pending/run/unittest_collection.check
+++ b/tests/run/unittest_collection.check
diff --git a/tests/pending/run/unittest_collection.scala b/tests/run/unittest_collection.scala
index d10845475..5db9b56d2 100644
--- a/tests/pending/run/unittest_collection.scala
+++ b/tests/run/unittest_collection.scala
@@ -4,11 +4,11 @@ object Test {
def main(args: Array[String]): Unit = {
test(collection.mutable.ArrayBuffer[String]())
- test(collection.mutable.ListBuffer[String]())
- class BBuf(z:ListBuffer[String]) extends BufferProxy[String] {
- def self = z
- }
- test(new BBuf(collection.mutable.ListBuffer[String]()))
+// test(collection.mutable.ListBuffer[String]())
+// class BBuf(z:ListBuffer[String]) extends BufferProxy[String] {
+// def self = z
+// }
+// test(new BBuf(collection.mutable.ListBuffer[String]()))
}
def test(x: Buffer[String]): Unit = {