Skip to content

Conflict between field and method in java file #4739

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
allanrenucci opened this issue Jun 29, 2018 · 0 comments
Closed

Conflict between field and method in java file #4739

allanrenucci opened this issue Jun 29, 2018 · 0 comments

Comments

@allanrenucci
Copy link
Contributor

public class TestJava {
  int foo;
  int foo() {
    return this.foo;
  }
}
dotc TestJava.java
-- [E119] Duplicate Symbol Error: tests/allan/TestJava.java:3:6 ----------------
3 |  int foo() {
  |      ^
  |method foo in class TestJava is already defined as var foo: Int at line 2.

This is an issue when compiling mixed Scala/Java code bases

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

3 participants