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

Peculiar error message "not found: type $$anon" #2388

Closed
scabug opened this issue Sep 24, 2009 · 5 comments
Closed

Peculiar error message "not found: type $$anon" #2388

scabug opened this issue Sep 24, 2009 · 5 comments
Assignees
Labels

Comments

@scabug
Copy link

@scabug scabug commented Sep 24, 2009

[Edited/minimized.] The spurious $anon error does not occur if they are both defs.

class Foo {
  val searchField = new AnyRef { search() }
  def search() = searchField
}
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 24, 2009

Imported From: https://issues.scala-lang.org/browse/SI-2388?orig=1
Reporter: Olli Aalto (odeamus)
See #4876

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 28, 2009

@cunei said:
Still present as of r18812.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented May 23, 2010

@paulp said:
I'm kicking this back to reviewer because I'm not able to figure what puts it in my zone. BTW these days there is only one spurious error:

scalac28 MyDialog2.scala 
MyDialog2.scala:12: error: recursive method search needs result type
        search()
        ^
MyDialog2.scala:9: error: not found: type $$anon
  private val searchField = new JTextField() {
                            ^
two errors found
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jun 8, 2010

@axel22 said:
Martin, could you take a look at this? We concluded at the meeting that this might be a type inference issue.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 7, 2011

Commit Message Bot (anonymous) said:
(extempore in r25457) Avoid some spurious errors after a cyclical reference error.
Closes #2388, no review.

@scabug scabug closed this Aug 7, 2011
@scabug scabug added the usability label 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.