You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the majority of cases typechecking replaces arbitrary trees that represent types with their TypeTree() equivalents that have the "tpe" fields that hold the compiled types and the "original" fields that hold the original trees with assigned symbols.
Case classes are no exception. Once plain and symless, after typechecking ValDefs have their tpts changed into TypeTrees. Thanks to originals, TypeTrees are friendly to resetAllAttrs, so everything seems to be fine. However, part of the implementation of case classes employs the violent UnTyper that erases the tpes without looking into originals. Trees that undergo such brutal treatment cannot be typechecked anymore.
Another source of non-idempotency is the whole synthetic business. Even if a case class or a case companion already have certain members, subsequent typechecking will try to add them again, resulting in conflicts and, ultimately, compilation errors.
The text was updated successfully, but these errors were encountered:
In the majority of cases typechecking replaces arbitrary trees that represent types with their TypeTree() equivalents that have the "tpe" fields that hold the compiled types and the "original" fields that hold the original trees with assigned symbols.
Case classes are no exception. Once plain and symless, after typechecking ValDefs have their tpts changed into TypeTrees. Thanks to originals, TypeTrees are friendly to resetAllAttrs, so everything seems to be fine. However, part of the implementation of case classes employs the violent UnTyper that erases the tpes without looking into originals. Trees that undergo such brutal treatment cannot be typechecked anymore.
Another source of non-idempotency is the whole synthetic business. Even if a case class or a case companion already have certain members, subsequent typechecking will try to add them again, resulting in conflicts and, ultimately, compilation errors.
The text was updated successfully, but these errors were encountered: