Skip to content

Synthetic TypeTree span should not be a range #15937

Open
@tgodzik

Description

@tgodzik

Compiler version

3.2.1-RC1-bin-20220829-63344e7-NIGHTLY

Minimized code

Lis@@t(1)

the corresponding tree is:

 TypeApply(
  fun = Select(qualifier = Ident(name = List), name = apply),
  args = List(
    TypeTree[TypeVar(TypeParamRef(A) -> TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Int))]
  )
)

The TypeTree span is equal to the position of List and causes Interactive.pathTo to include TypeTree in the result, which is not correct, since the type variable is not available in the code.

Expectation

TypeTree should have a zero span.

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