Skip to content

Infix operators printed in error messages use invalid syntax #4566

Closed
@pweisenburger

Description

@pweisenburger

Infix operators shown in error messages use fully-qualified names, e.g., Int my.full.name.:: Int. On the one hand, you can see the full name (which might be a valuable information). On the other hand, it's not valid syntax and quite hard to read (especially for longer names). Scala prints the type as Int :: Int.

Example:

object test {
  type ::[A, B]
  def a: Int :: Int = ???
  def b: Int = a
}

Message:

4 |    def b: Int = a
  |                 ^
  |                 found:    Int test.:: Int
  |                 required: Int

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