From 7f9c2636cf560b066783e0745a08393ce17531cd Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 6 Feb 2012 13:11:30 -0800 Subject: 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) :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 .(:9) at .() at .(:11) --- test/files/neg/anyval-children-2.scala | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test/files/neg/anyval-children-2.scala (limited to 'test/files/neg/anyval-children-2.scala') diff --git a/test/files/neg/anyval-children-2.scala b/test/files/neg/anyval-children-2.scala deleted file mode 100644 index 4034eb22dd..0000000000 --- a/test/files/neg/anyval-children-2.scala +++ /dev/null @@ -1 +0,0 @@ -@inline trait NotOkDingus1 extends AnyVal // fail -- cgit v1.2.3