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 commented Aug 7, 2008

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

{() => case class Bar; Bar}

@scabug
Copy link
Author

scabug commented Aug 7, 2008

Imported From: https://issues.scala-lang.org/browse/SI-1195?orig=1
Reporter: @JamesIry

@scabug
Copy link
Author

scabug commented Aug 7, 2008

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

@scabug
Copy link
Author

scabug commented Aug 7, 2008

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

@scabug
Copy link
Author

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
Copy link
Author

scabug commented Aug 7, 2008

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

@scabug
Copy link
Author

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
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants