Skip to content

Scala 2.13.12 fatal warning with -Xsource:3 and private constructor for case class #12883

@vladimirkl

Description

@vladimirkl

Reproduction steps

Scala version: 2.13.12

scala> case class Data private (s: String)
                  ^
       error: constructor modifiers are assumed by synthetic `copy` method
       Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
       Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=Data

Problem

Same warning is for synthetic apply method. This cannot be fixed without redefining copy and apply explicitly and doesn't help with any Scala 3 migration issue. In all cases I have to suppress it with @nowarn

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions