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
Closed
Assignees
Milestone

Comments

@scabug
Copy link

@scabug 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

This comment has been minimized.

Copy link
Author

@scabug 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

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 26, 2012

@paulp said:
Nothing to do with the repl.

@scabug

This comment has been minimized.

Copy link
Author

@scabug 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

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 28, 2012

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 10, 2012

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

@scabug

This comment has been minimized.

Copy link
Author

@scabug 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
                      ^
@scabug scabug closed this Sep 10, 2012
@scabug scabug added this to the 2.10.0-M7 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.