Skip to content

when mixing Scala & Java, scalac fails to find inner enum of parent interface #1646

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

Closed
scabug opened this issue Jan 17, 2009 · 5 comments
Closed
Assignees

Comments

@scabug
Copy link

scabug commented Jan 17, 2009

This fails in both 2.7.2.final and 2.7.3.final:

Scala compiler version 2.7.3.final -- Copyright 2002-2009, LAMP/EPFL
// Java source
interface I { enum E {E1} }
class J1 implements I { void foo(E e) { } }
class J2 extends J1 { void foo( E e ) { } }
// Scala source
object S { new J2 { } }

javac *.java
// Java compilation succeeded!
rm -f *.class
scalac *.scala *.java
J2.java:1: error: not found: type E
class J2 extends J1 { void foo( E e ) { } }
                                ^
one error found
gnumake: *** [test] Error 1

I haven't been able to construct a test case involving fewer than three source files. The attachment is a zip file containing a Makefile and the three source files.

@scabug
Copy link
Author

scabug commented Jan 17, 2009

Imported From: https://issues.scala-lang.org/browse/SI-1646?orig=1
Reporter: @SethTisue
Attachments:

  • newbug.zip (created on Jan 17, 2009 4:38:56 PM UTC, 1005 bytes)

@scabug
Copy link
Author

scabug commented Jan 17, 2009

@SethTisue said:
source files and Makefile of test case

@scabug
Copy link
Author

scabug commented Feb 19, 2009

@cunei said:
The supplied example succeeds using trunk as of r17153.

@scabug
Copy link
Author

scabug commented Feb 19, 2009

@SethTisue said:
confirmed.

@scabug
Copy link
Author

scabug commented May 21, 2010

@SethTisue said:
related: #1409

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