diff options
author | Paul Phillips <paulp@improving.org> | 2012-02-06 13:11:30 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-06 15:12:45 -0800 |
commit | 7f9c2636cf560b066783e0745a08393ce17531cd (patch) | |
tree | 225407c8dc22bab25301f9916c6c70eaba00d0ae /test/files/neg/t875.scala | |
parent | 7539c4ee51c25a684399cd5400bf0285e6508fe2 (diff) | |
download | scala-7f9c2636cf560b066783e0745a08393ce17531cd.tar.gz scala-7f9c2636cf560b066783e0745a08393ce17531cd.tar.bz2 scala-7f9c2636cf560b066783e0745a08393ce17531cd.zip |
Removing unnecessary AnyVal code.
...since it works from source. The parser must be forcibly restrained
from adding a bogus constructor, but other than that it's pretty much
smooth sailing. To give an idea how smooth, if I change scala.Short like so:
trait Bippy extends Any
final class Short extends AnyVal with Bippy
Then it just works, at least until the fiction is revealed.
scala> def f(x: Bippy) = x
f: (x: Bippy)Bippy
scala> f(5)
<console>:9: error: type mismatch;
found : Int(5)
required: Bippy
f(5)
^
scala> f(5: Short)
java.lang.ClassCastException: java.lang.Short cannot be cast to scala.Bippy
at .<init>(<console>:9)
at .<clinit>(<console>)
at .<init>(<console>:11)
Diffstat (limited to 'test/files/neg/t875.scala')
0 files changed, 0 insertions, 0 deletions