summaryrefslogtreecommitdiff
path: root/test/pos/patterns.scala
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-01-19 09:25:20 +0000
committerpaltherr <paltherr@epfl.ch>2004-01-19 09:25:20 +0000
commit1dbc00126bf0e660b0286ac247271549158bcb65 (patch)
treefce1c2b6f71dd879b752edc54289386fb86942e1 /test/pos/patterns.scala
parenta7fc16dfe690cf0f0a7db36596c7e26a8c417f82 (diff)
downloadscala-1dbc00126bf0e660b0286ac247271549158bcb65.tar.gz
scala-1dbc00126bf0e660b0286ac247271549158bcb65.tar.bz2
scala-1dbc00126bf0e660b0286ac247271549158bcb65.zip
- Moved test/pos test/neg and test/new into tes...
- Moved test/pos test/neg and test/new into test/files
Diffstat (limited to 'test/pos/patterns.scala')
-rw-r--r--test/pos/patterns.scala27
1 files changed, 0 insertions, 27 deletions
diff --git a/test/pos/patterns.scala b/test/pos/patterns.scala
deleted file mode 100644
index f996f89725..0000000000
--- a/test/pos/patterns.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-trait Option[+a] {}
-case class Some[a](x: a) extends Option[a] {
- override def toString(): scala.String = "Some(" + x + ")";
- override def equals(that: Any): Boolean = that match {
- case Some(x) => this.x == x
- case _ => false
- }
- override def hashCode(): scala.Int = getClass().hashCode() * 41 + x.hashCode();
-}
-case object None extends Option[All] {
- override def toString(): scala.String = "None";
- override def equals(that: Any) = that match {
- case None => true
- case _ => false
- }
- override def hashCode(): scala.Int = getClass().hashCode();
-}
-
-object test {
-
- def println(str: String): Unit = java.lang.System.out.println(str);
-
- def print(opt: Option[String]) = opt match {
- case Some(x) => println(x);
- case None => println("nothing");
- }
-} \ No newline at end of file