Skip to content

Java parser handling of inherited members for imports is incorrect #18531

Open
@andrew-boyarshin

Description

@andrew-boyarshin

Compiler version

3.3.1

Minimized code

Repo (branch 3)

TLDR:

package bug.code;

import static bug.code.Symbol.*;

public class Code {
    public void constant(LoadableConstant c) {
    }
}
package bug.code;

public abstract class Symbol implements Constant {
}
package bug.code;

public interface Constant {
    interface LoadableConstant extends Constant {
    }
}

Output

-- [E006] Not Found Error: .\src\code\Code.java:6:25 ---------------------------
6 |    public void constant(LoadableConstant c) {
  |                         ^^^^^^^^^^^^^^^^
  |                         Not found: type LoadableConstant
  |
  | longer explanation available when compiling with `-explain`

Expectation

Scala code compiles successfully in mixed mode, like in Scala 2.13.11.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions