summaryrefslogtreecommitdiff
path: root/test/files/run/interpreter.scala
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2008-02-18 21:22:08 +0000
committerLex Spoon <lex@lexspoon.org>2008-02-18 21:22:08 +0000
commit41dc7225084c735f0306e0ebb1a9da0fbd9886ff (patch)
tree071a5737f9f871bc8b5769584cdf5327ada971bc /test/files/run/interpreter.scala
parent1769b68a6d41010aebcd76d240c1a74166a99419 (diff)
downloadscala-41dc7225084c735f0306e0ebb1a9da0fbd9886ff.tar.gz
scala-41dc7225084c735f0306e0ebb1a9da0fbd9886ff.tar.bz2
scala-41dc7225084c735f0306e0ebb1a9da0fbd9886ff.zip
Generalizes the allowed inputs to the interpret...
Generalizes the allowed inputs to the interpreter to be any combination of phrases that can be placed inside a template. Instead of having one "request" object try to understand the entire combination of phrases, the code now uses multiple "member handlers" for each request, one member handler for each phrase.
Diffstat (limited to 'test/files/run/interpreter.scala')
-rw-r--r--test/files/run/interpreter.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/interpreter.scala b/test/files/run/interpreter.scala
index 5ad9953857..b239b253cf 100644
--- a/test/files/run/interpreter.scala
+++ b/test/files/run/interpreter.scala
@@ -19,6 +19,8 @@ type anotherint = Int
val four: anotherint = 4
val bogus: anotherint = "hello"
trait PointlessTrait
+val (x,y) = (2,3)
+println("hello")
// implicit conversions
case class Foo(n: int)
@@ -111,6 +113,12 @@ there
def `match` = 1
val x = `match`
+// multiple classes defined on one line
+sealed class Exp; class Fact extends Exp; class Term extends Exp
+def f(e: Exp) = e match {{ // non-exhaustive warning here
+ case _:Fact => 3
+}}
+
</code>.text
/** A writer that skips the first line of text. The first