summaryrefslogtreecommitdiff
path: root/test/files/neg/gadts1.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-11-18 22:06:03 +0000
committerPaul Phillips <paulp@improving.org>2009-11-18 22:06:03 +0000
commitae024cebd4a41339039f3df91c8aa4a02522594f (patch)
tree07c5e3a27ce4636f76eb73fe43353fc6c6aa0362 /test/files/neg/gadts1.scala
parent536955e1afd68ac6f99f0347fa14a58ab47cb958 (diff)
downloadscala-ae024cebd4a41339039f3df91c8aa4a02522594f.tar.gz
scala-ae024cebd4a41339039f3df91c8aa4a02522594f.tar.bz2
scala-ae024cebd4a41339039f3df91c8aa4a02522594f.zip
Finally completed the incredibly tedious task o...
Finally completed the incredibly tedious task of removing the lower case primitive aliases from Predef. Had to rebuild msil.jar along the way.
Diffstat (limited to 'test/files/neg/gadts1.scala')
-rw-r--r--test/files/neg/gadts1.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/files/neg/gadts1.scala b/test/files/neg/gadts1.scala
index 67aef4f2d9..07200ff7aa 100644
--- a/test/files/neg/gadts1.scala
+++ b/test/files/neg/gadts1.scala
@@ -1,8 +1,8 @@
object Test{
abstract class Number
-case class Int(n: int) extends Number
-case class Double(d: double) extends Number
+case class Int(n: scala.Int) extends Number
+case class Double(d: scala.Double) extends Number
trait Term[+a]
case class Cell[a](var x: a) extends Term[a]
@@ -10,7 +10,7 @@ case class NumTerm(val n: Number) extends Term[Number]
class IntTerm(n: Int) extends NumTerm(n) with Term[Int]
-def f[a](t:Term[a], c:Cell[a]): unit =
+def f[a](t:Term[a], c:Cell[a]): Unit =
t match {
case NumTerm(n) => c.x = Double(1.0)
}
@@ -18,7 +18,7 @@ def f[a](t:Term[a], c:Cell[a]): unit =
val x:Term[Number] = NumTerm(Int(5))
-def main(args: Array[String]): unit = {
+def main(args: Array[String]): Unit = {
val cell = Cell[Int](Int(6))
Console.println(cell)
f[Int](new IntTerm(Int(5)), cell)