We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.1.3
scala> class UInt(val toInt: Int) extends AnyVal // defined class UInt scala> val foo = UInt(23) val foo: UInt = 23 scala> foo.toString val res1: String = UInt@17
I expect UInt@17 both times, as is in Scala 2 REPL
UInt@17
The text was updated successfully, but these errors were encountered:
I might have expected 23 both times, except 23 is a pun for literal types.
23
It's also eerie that magic number 17 appears in the result.
17
Sorry, something went wrong.
@som-snytt 17 is not a magic number. It's hex for 23.
rochala
Successfully merging a pull request may close this issue.
Compiler version
3.1.3
Minimized code
Expectation
I expect
UInt@17
both times, as is in Scala 2 REPLThe text was updated successfully, but these errors were encountered: