New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REPL :type multiple vals #7942
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7942?orig=1 |
@paulp said: |
@som-snytt said: Your bon mot on the PR was "that's what we have a compiler for." In this case, "that's what we have the AST for", so I shouldn't have to do more than the usual wrapping to get the types of stuff. |
@som-snytt said: scala> :type val i = { println("hi"); 7 }
Int
// ok, that's what I want, go ahead and do it
scala> :paste -
hi
i: Int = 7 I thought it wasn't supposed to evaluate, by the way, so maybe I'm missing something in the nomenclature: Welcome to Scala version 2.11.0-20131018-072258-54707cb450 (OpenJDK 64-Bit Server VM, Java 1.7.0_25).
Type in expressions to have them evaluated.
Type :help for more information.
scala> :type val i = { println("hi"); 7 }
hi
Int |
The first issue progressed but not the last, which I will close as out of scope, together with "more unusual ways to paste code." |
Just trying to understand the type command in REPL.
Maybe there are still some corner cases. I did follow #7132.
The text was updated successfully, but these errors were encountered: