summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-01-25 08:48:29 +0000
committerpaltherr <paltherr@epfl.ch>2004-01-25 08:48:29 +0000
commitc8842d2ece2e6a23fd1b660d9a6c9aed8db6843e (patch)
treef4b76a758846b84707e45751fd0f9d82540a3f7e /test/files/pos
parent5069b94720c924af4171863955cb80ac26a18ecb (diff)
downloadscala-c8842d2ece2e6a23fd1b660d9a6c9aed8db6843e.tar.gz
scala-c8842d2ece2e6a23fd1b660d9a6c9aed8db6843e.tar.bz2
scala-c8842d2ece2e6a23fd1b660d9a6c9aed8db6843e.zip
- Removed duplicate test
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/abstract-data.scala55
1 files changed, 0 insertions, 55 deletions
diff --git a/test/files/pos/abstract-data.scala b/test/files/pos/abstract-data.scala
deleted file mode 100644
index eaa23b6834..0000000000
--- a/test/files/pos/abstract-data.scala
+++ /dev/null
@@ -1,55 +0,0 @@
-package expAbstractData;
-
-/** A base class consisting of
- * - a root trait (i.e. abstract class) `Exp' with an `eval' function
- * - an abstract type `exp' bounded by `Exp'
- * - a concrete instance class `Num' of `Exp' for numeric literals
- */
-trait Base {
- type exp <: Exp;
-
- trait Exp {
- def eval: int
- }
- class Num(v: int): exp extends Exp {
- val value = v;
- def eval = value
- }
-}
-
-object testBase extends Base with Application {
- type exp = Exp;
- val term = new Num(2);
- System.out.println(term.eval);
-}
-
-/** Data extension: An extension of `Base' with `Plus' expressions
- */
-trait BasePlus extends Base {
- class Plus(l: exp, r: exp): exp extends Exp {
- val left = l;
- val right = r;
- def eval = left.eval + right.eval
- }
-}
-
-/** Operation extension: An extension of `Base' with 'show' methods.
- */
-trait Show extends Base {
- type exp <: Exp1;
-
- trait Exp1 extends Exp {
- def show: String;
- }
- class Num1(v: int): exp extends Num(v) with Exp1 {
- def show = value.toString();
- }
-}
-
-/** Operation extension: An extension of `BasePlus' with 'show' methods.
- */
-trait ShowPlus extends BasePlus with Show {
- class Plus1(l: exp, r: exp): exp extends Plus(l, r) with Exp1 {
- def show = left.show + " + " + right.show
- }
-} \ No newline at end of file