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

Compiler crash related to abstract types and @specialized type parameter #4957

Closed
scabug opened this issue Sep 1, 2011 · 2 comments
Closed

Compiler crash related to abstract types and @specialized type parameter #4957

scabug opened this issue Sep 1, 2011 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Sep 1, 2011

The attached file Vector.scala crashes the Scala compiler. Please see the attached stack trace.

The source code should be self-explanatory. I'm trying to write immutable versions of some java.awt.geom classes, with implicit conversions from/to the AWT versions. This turned out to be much harder than expected. For the last two weeks I've been struggling with Scala's type system, including some compiler crashes, but I've never been able to isolate any of them so I could file a decent bug report.

The offending line is the scalar multiplication in line 50. If you take it away, it compiles fine. If you take away the @specialized, it compiles too.

The latter could be a workaround, but I want T to be specialized. Regarding the "C#I": it looks kind of weird, but it's the best solution I've been able to find. If there's a better one, I would be glad to hear about it.

Thanks
Christoph

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 1, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4957?orig=1
Reporter: Christoph Radig (cradig)
Affected Versions: 2.8.1, 2.9.0, 2.9.1
Attachments:

  • stacktrace.txt (created on Sep 1, 2011 6:58:01 AM UTC, 19034 bytes)
  • Vector.scala (created on Sep 1, 2011 6:58:01 AM UTC, 1660 bytes)
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 29, 2011

Commit Message Bot (anonymous) said:
(extempore in r25908) Test case closes #4957.

No review.

@scabug scabug closed this Oct 29, 2011
@scabug scabug added this to the 2.10.0 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.