Skip to content

Java parser handling of nested class imports is incorrect #18530

Open
@andrew-boyarshin

Description

@andrew-boyarshin

Compiler version

3.3.1

Minimized code

Repo (branch 2)

TLDR:

package bug.code;

import bug.actions.Smart.Action;

import java.util.ArrayDeque;

public class Code {
    public static class Variable {
        public ArrayDeque<Action> actions = new ArrayDeque<Action>();
    }
}

Output

-- [E006] Not Found Error: .\src\code\Code.java:9:26 ---------------------------
9 |        public ArrayDeque<Action> actions = new ArrayDeque<Action>();
  |                          ^^^^^^
  |                          Not found: type Action
  |
  | 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