diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/jvm5/interpreter.check | 6 | ||||
-rw-r--r-- | test/files/jvm5/interpreter.scala | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/files/jvm5/interpreter.check b/test/files/jvm5/interpreter.check index aa2776f34b..cd55922604 100644 --- a/test/files/jvm5/interpreter.check +++ b/test/files/jvm5/interpreter.check @@ -210,3 +210,9 @@ f: (Exp)Int scala> scala> +plusOne: (Int)Int +res0: Int = 6 +res0: java.lang.String = after reset +<console>:5: error: not found: value plusOne + plusOne(5) // should be undefined now + ^ diff --git a/test/files/jvm5/interpreter.scala b/test/files/jvm5/interpreter.scala index f5ce68a1b9..21c88734e0 100644 --- a/test/files/jvm5/interpreter.scala +++ b/test/files/jvm5/interpreter.scala @@ -168,5 +168,12 @@ def f(e: Exp) = e match {{ // non-exhaustive warning here val repl = new InterpreterLoop(input, output) repl.main(new Settings) println() + + val interp = new Interpreter(new Settings) + interp.interpret("def plusOne(x: Int) = x + 1") + interp.interpret("plusOne(5)") + interp.reset() + interp.interpret("\"after reset\"") + interp.interpret("plusOne(5) // should be undefined now") } } |