Skip to content
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 crashes with unrecoverable error when defining abstract class extending AnyVal #6283

Closed
scabug opened this issue Aug 26, 2012 · 6 comments

Comments

@scabug
Copy link

scabug commented Aug 26, 2012

scala> abstract class Funky(val i: Int) extends AnyVal
exception when typing $this.i().hashCode()/class scala.reflect.internal.Trees$Apply
class Funky is abstract; cannot be instantiated in file <console>
scala.reflect.internal.Types$TypeError: class Funky is abstract; cannot be instantiated
        at scala.tools.nsc.typechecker.Contexts$Context.issueCommon(Contexts.scala:375)
...
ReplGlobal.abort: unrecoverable error
error: unrecoverable error
@scabug
Copy link
Author

scabug commented Aug 26, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6283?orig=1
Reporter: Martin Egri (teknocide)
Other Milestones: 2.10.0

@scabug
Copy link
Author

scabug commented Aug 26, 2012

@paulp said:
Nothing to do with the repl.

@scabug
Copy link
Author

scabug commented Aug 28, 2012

@jsuereth said:
Looks like we just need to fix the error message here. Do you have time to fix this for 2.10.x?

@scabug
Copy link
Author

scabug commented Aug 28, 2012

@paulp said:
scala/scala#1206

@scabug
Copy link
Author

scabug commented Sep 10, 2012

@harrah said:
Looks like the pull request was merged, is this fixed now?

@scabug
Copy link
Author

scabug commented Sep 10, 2012

@paulp said:


scala> abstract class Funky(val i: Int) extends AnyVal
<console>:7: error: `abstract' modifier cannot be used with value classes
       abstract class Funky(val i: Int) extends AnyVal
                      ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants