Skip to content

Clarify -Wconf:help that last setting wins, including in comma-separated setting text #19885

Open
@lrytz

Description

@lrytz

The -Wconf:help text also says the leftmost matching rule should apply.

Scala 2

➜ sandbox s -Wconf:any:e,cat=deprecation:s
Welcome to Scala 2.13.13 (OpenJDK 64-Bit Server VM, Java 21.0.1).

scala> 1 → 2
         ^
       error: method → in class ArrowAssoc is deprecated (since 2.13.0): Use `->` instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Scala 3

➜ sandbox s3 -Wconf:any:e,cat=deprecation:s
Welcome to Scala 3.4.0 (21.0.1, Java OpenJDK 64-Bit Server VM).

scala> 1 → 2
val res0: (Int, Int) = (1,2)

➜ sandbox s3 -Wconf:any:s,cat=deprecation:e
Welcome to Scala 3.4.0 (21.0.1, Java OpenJDK 64-Bit Server VM).

scala> 1 → 2
-- Error: ----------------------------------------------------------------------
1 |1 → 2
  |^^^
  |method → in class ArrowAssoc is deprecated since 2.13.0: Use `->` instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions