Skip to content

Conflict between field and method in java file #4739

Closed
@allanrenucci

Description

@allanrenucci
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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions