Skip to content

Abstract error message only show the start of the name #22941

Open
@tgodzik

Description

@tgodzik

Compiler version

If you're not sure what version you're using, run print scalaVersion from sbt
(if you're running scalac manually, use scalac -version instead).

Minimized code

//> using scala 3

trait Foo:
  def bar: String

class Baz extends Foo:
  val a = "hello"

Output

-- Error: /Users/tgodzik/Documents/workspaces/test-sample/test1.scala:6:6 ------
6 |class Baz extends Foo:
  |      ^
  |class Baz needs to be abstract, since def bar: String in trait Foo is not defined 
1 error found
Compilation failed

Expectation

-- Error: /Users/tgodzik/Documents/workspaces/test-sample/test1.scala:6:6 ------
6 |class Baz extends Foo:
  |      ^^^
  |class Baz needs to be abstract, since def bar: String in trait Foo is not defined 
1 error found
Compilation failed

My guess is that it needs to be fixed around

report.error(abstractErrorMessage, clazz.srcPos)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions