Created
April 29, 2012 17:04
-
-
Save retronym/2551948 to your computer and use it in GitHub Desktop.
interpreter result
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> val intp = new scala.tools.nsc.interpreter.IMain | |
intp: scala.tools.nsc.interpreter.IMain = scala.tools.nsc.interpreter.IMain@6875577e | |
scala> val holder = new scala.runtime.ObjectRef[Any] | |
holder: scala.runtime.ObjectRef[Any] = () | |
scala> intp.bind("holder", "scala.runtime.ObjectRef[Any]", holder) | |
holder: scala.runtime.ObjectRef[Any] = () | |
res16: scala.tools.nsc.interpreter.IR.Result = Success | |
scala> intp.interpret("holder.elem = {1 + 2}") | |
holder.elem: Any = 3 | |
res17: scala.tools.nsc.interpreter.IR.Result = Success | |
scala> holder.elem | |
res18: Any = 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment