Skip to content

Incorrectly renderred signature for parameterless method in error message reporting unimplemented method #11201

Closed
@marcinzh

Description

@marcinzh

Compiler version

3.0.0-RC1-bin-20210117-65b17af-NIGHTLY

Minimized code

trait Foo:
  def foo: Int
  def foo2: Int // optionally one more, to trigger Dotty to propose stubs

class Bar extends Foo

Output

class Bar extends Foo
      ^
      class Bar needs to be abstract, since:
      it has 2 unimplemented members.
      /** As seen from class Bar, the missing signatures are as follows.
       *  For convenience, these are usable as stub implementations.
       */
        def foo: => Int = ???
        def foo2: => Int = ???

Expectation

The method signature printed in error message & proposed stub should be:

foo: Int

instead of:

foo: => Int

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions