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

Comments

@scabug
Copy link

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

scabug commented Sep 24, 2009

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

@scabug
Copy link
Author

scabug commented Sep 28, 2009

@cunei said:
Still present as of r18812.

@scabug
Copy link
Author

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

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants