diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-14 17:32:16 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-14 17:32:16 +0100 |
commit | 01db9a68e5e68f08c8236c23c905009789d51587 (patch) | |
tree | 3e45103b0d36505d6f86f3024e56780e840c156b /tests | |
parent | d65587ae74cfe2dc7601f57e163b7e22bf89582a (diff) | |
download | dotty-01db9a68e5e68f08c8236c23c905009789d51587.tar.gz dotty-01db9a68e5e68f08c8236c23c905009789d51587.tar.bz2 dotty-01db9a68e5e68f08c8236c23c905009789d51587.zip |
Fixed several deep problems in handling of types and symbols.
1. We forgot to mark declaration symbols Deferred.
2. Types with NoPrefix and the same name got identified. Fixed by adding a new category WithNoPrefix to named types, and changing the way named types get generated.
3. Self types lacked parameters. (Question: Do we need to also track type members?)
4. Printers caused cyclic reference errors. Now some print operations are more careful with forcing.
5. Namedparts accumulator has to be more careful with ThisTypes. Because self types now contain parameters, which might lead back to this, we only add the class name (or the source module, if it's a module class).
6. toBounds in TypeApplications needs to use Co/Contra aliases for expanded name parameters, not just local ones.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/functions1.scala | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/pos/functions1.scala b/tests/pos/functions1.scala index 12df12e50..99709bc88 100644 --- a/tests/pos/functions1.scala +++ b/tests/pos/functions1.scala @@ -10,5 +10,24 @@ object Functions { val xf2: String => Int = x.foo(_) val x2: String => Int = x.foo val x3 = x.foo _ - + /* + abstract class Spore[T, U] { + def run(x: T): U + } + + trait Spore2[T, U] { self: Spore2[T, U] => + def run(x: T): U + } + + val x: String => String = { + case "abc" => "" + case x => x + } + val y: PartialFunction[String, String] = x => x match { + case "abc" => "" + case _ => x + } + val z: Spore[String, String] = x => x + x + val z2: Spore2[String, String] = x => x + x + */ } |