summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-01-30 12:42:26 -0800
committerPaul Phillips <paulp@improving.org>2012-01-30 22:18:25 -0800
commita9eb9c5b69071a944d2a5225aa320babdf33ad42 (patch)
tree52c6353685c24c2101f8a963a66068a703405584 /test/files/pos
parent74a252e668959dd2cf4808132473d8b15bb606af (diff)
downloadscala-a9eb9c5b69071a944d2a5225aa320babdf33ad42.tar.gz
scala-a9eb9c5b69071a944d2a5225aa320babdf33ad42.tar.bz2
scala-a9eb9c5b69071a944d2a5225aa320babdf33ad42.zip
More work on inline classes.
Fail compile if AnyVal is inherited by a trait, a non-@inline class, or a class with an AnyRef parent somewhere. Added tests. Added logging, like [log extmethods] Inline class class Bippy spawns extension method. Old: def getClass: Class[_ <: Bippy] New: final def extension$getClass($this: Bippy): Class[_ <: Bippy] Fixed what I hope was a bug in ExtensionMethods where the original method params were dropped. Since adding a NonNull parent was also inflicting an AnyRef on AnyVal subclasses, suppressed that for those. Had the bright idea that AnyVal could extend NotNull. It doesn't seem to accomplish much, but then, I don't think NotNull accomplishes much. Still, maybe it's time to restrict the ways one can use AnyVal so one can't do this: scala> var x: AnyVal = _ x: AnyVal = null
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/anyval-children.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/files/pos/anyval-children.scala b/test/files/pos/anyval-children.scala
index 7a2eda8b3f..4ef10a094f 100644
--- a/test/files/pos/anyval-children.scala
+++ b/test/files/pos/anyval-children.scala
@@ -1 +1 @@
-class Bippy extends AnyVal \ No newline at end of file
+@inline class Bippy extends AnyVal \ No newline at end of file