diff options
author | Martin Odersky <odersky@gmail.com> | 2012-03-05 16:07:51 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2012-03-05 16:07:51 +0100 |
commit | fa55e4f0f8d2834becdb9a9aef9c3ea65cb31fee (patch) | |
tree | 2b32f1ff661cbb59257fc429be646bb0cae5c908 /test/files/neg/valueclasses-doubledefs.scala | |
parent | edaf481155a550c2b5199de6702c7cbdc2007d58 (diff) | |
download | scala-fa55e4f0f8d2834becdb9a9aef9c3ea65cb31fee.tar.gz scala-fa55e4f0f8d2834becdb9a9aef9c3ea65cb31fee.tar.bz2 scala-fa55e4f0f8d2834becdb9a9aef9c3ea65cb31fee.zip |
Added check that primary constructor of a value class must be public.
Diffstat (limited to 'test/files/neg/valueclasses-doubledefs.scala')
-rw-r--r-- | test/files/neg/valueclasses-doubledefs.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/neg/valueclasses-doubledefs.scala b/test/files/neg/valueclasses-doubledefs.scala new file mode 100644 index 0000000000..87bcf8fee3 --- /dev/null +++ b/test/files/neg/valueclasses-doubledefs.scala @@ -0,0 +1,6 @@ +class Meter(val x: Double) extends AnyVal + +class Foo { + def apply(x: Double) = x.toString + def apply(x: Meter) = x.toString +} |