Skip to content

Typer inlines constants and makes dependency analysis impossible #7173

@scabug

Description

@scabug

The problem has been mentioned here:
https://groups.google.com/d/topic/scala-internals/b95Y-GbXVGA/discussion

The gist is that typer inlines compile time constants (e.g. references to static fields defined in Java) and forgets about the original tree that referred to a constant (e.g. to a field) which makes dependency analysis impossible.

According to Adriaan pattern matcher does not need constants to be inlined because it works with types. I couldn't readily find a reason why we need to inline those constants in typer so we probably should move this all the way to erasure.

I'm logging a ticket to not forget to investigate if we can do that for 2.10.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions