Skip to content

extending java.lang.Enum should be desugared before TASTy  #7478

Open
@bishabosha

Description

@bishabosha

minimized code

Compile with 0.27.0-RC1

enum A extends java.lang.Enum[A]
  case A1

In TASTy, the first parent of A is

TypeApply(Select(New(java.lang.Enum[A]),<init>[Signed (1)java.lang.Enum]), List(A))

with no value arguments passed.

expectation

The parent in TASTy should be

Apply(TypeApply(Select(New(java.lang.Enum[A]),<init>[Signed (1,java.lang.String,scala.Int)java.lang.Enum]), List(A)), List($name, _$ordinal))

with any other relevant desugarings applied, such as adding $name and _$ordinal to the constructor of A

Alternative

special-casing the synthetic no-arg java.lang.Enum constructor becomes part of the specification for TASTy

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:enumsarea:tasty-formatissues relating to TASTy as a portable standardbacklogNo work planned on this by the core team for the time being.itype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions