Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Distinguish warnings configured to error from "compiler-native" errors #12831

@som-snytt

Description

@som-snytt

Reproduction steps

Scala version: 2.13.11

  ~ scala -Wconf:cat=deprecation:e
Welcome to Scala 2.13.11 (OpenJDK 64-Bit Server VM, Java 20.0.1).
Type in expressions for evaluation. Or try :help.

scala> @deprecated("","") def f = 42

         lazy val $result = $line3.$read.INSTANCE.$iw.f
                                                      ^
<synthetic>:4: error: method f is deprecated

(To diagnose errors in synthetic code, try adding `// show` to the end of your input.)

scala> def f: String = 42
                       ^
       error: type mismatch;
        found   : Int(42)
        required: String

scala>

Problem

The word "error" is in red in both messages, but one is a boosted error.

Maybe boosted errors could be purple.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions