Skip to content

NoSuchFieldError when changing type parameter on enum case (incremental compilation) #6677

Closed
@DReigada

Description

@DReigada

If we compile the following enum:

enum Foo[A] {
  case Bar extends Foo[Int] // -> Foo[String]
}

Then change the case to case Bar extends Foo[String] and recompile the code (using sbt) without cleaning, any usages of Bar (from another source file) throw NoSuchFieldError.
If the project is cleaned before running again this works without any problem

Project with reproducible example: https://github.com/DReigada/dotty-runtime-error-sample

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions