aboutsummaryrefslogtreecommitdiff
path: root/tests/new
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-12 15:06:17 +0100
committerTobias Schlatter <tobias@meisch.ch>2014-03-20 20:25:05 +0100
commita4516eac1be98830c99ea48e9baedf022dfcb9f7 (patch)
tree8e0e62943160fb948bf338ace7b01bd0990ad2bc /tests/new
parent5b687fbee23060fbed285f090e3592f2b8cb6beb (diff)
downloaddotty-a4516eac1be98830c99ea48e9baedf022dfcb9f7.tar.gz
dotty-a4516eac1be98830c99ea48e9baedf022dfcb9f7.tar.bz2
dotty-a4516eac1be98830c99ea48e9baedf022dfcb9f7.zip
Hygienic desugaring
Made desugaring hygienic. Trees that are derived from some other tree are no longer stored as simple untyped Ident trees, but as TypeTrees that know how to derive their types from some other type. Test cases in pos: hygiene.scala, t0054.scala and t0085.scala. The comment in hygiene.scala points to the difficulties we are facing. In particular, we need type trees that can rebind some references of a source type to local occurrences with the same name. t0054.scala is similar to hygiene.scala. t0085.scala is trickier, but also related. Essentially the problem there is that we have a class that inherits its outer class. In this case it is important to resolve an identifier in the right context. The identifier added to the copy method of a case class must be resolved outside the class (just like the same identifier in the constructor of that case class).
Diffstat (limited to 'tests/new')
-rw-r--r--tests/new/t0039.scala6
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/new/t0039.scala b/tests/new/t0039.scala
deleted file mode 100644
index 652c606b0..000000000
--- a/tests/new/t0039.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-abstract class Extensible[A, This <: Extensible[A, This]](x: A, xs: This) { self: This =>
- def mkObj(x: A, xs: This): This;
-}
-class Fixed[A](x: A, xs: Fixed[A]) extends Extensible[A, Fixed[A]](x, xs) {
- def mkObj(x: A, xs: Fixed[A]) = new Fixed(x, xs);
-}