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

Definition and use of an object in a function causes compiler crash #1195

Closed
scabug opened this issue Aug 7, 2008 · 7 comments
Closed

Definition and use of an object in a function causes compiler crash #1195

scabug opened this issue Aug 7, 2008 · 7 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Aug 7, 2008

The following (illegal) code causes a compiler crash in 2.7.1 final

{() => case class Bar; Bar}

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 7, 2008

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 7, 2008

@JamesIry said:
The simpler "{case class Bar; Bar} " causes a type mismatch error, but does not crash.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 7, 2008

@JamesIry said:
The simpler "{() => object Bar; Bar}" also crashes.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 7, 2008

Aaron Harnly (aaronharnly) said:
Yeah, I'm not certain whether this is invalid / illegal. The related code

{ object Bar ; Bar }

which gives a type error:

 found   : Bar.type(in object $$iw) where type Bar.type(in object $$iw) <: Bar with Singleton
 required: Bar.type(in value res1) forSome { type Bar.type(in value res1) <: Bar with Singleton; type Bar <: java.lang.Object with ScalaObject }

should maybe return a value of type ScalaObject?

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 7, 2008

Aaron Harnly (aaronharnly) said:
or ScalaObject with Singleton.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 8, 2008

@JamesIry said:
Based on aaronharnly's comment, I'm renaming this bug and I've created #1201 as a separate issue

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Feb 12, 2012

@paulp said:
Fixed in 7a6fa80937 or 7a6fa80937^ .

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.