Skip to content

Classes can't have an unfulfilled self type with unimplemented methods #4252

Closed
@allanrenucci

Description

@allanrenucci
trait Bar { def bar: Int }
class Foo { self : Bar => }
2 |class Foo { self : Bar => }
  |      ^
  |   class Foo needs to be abstract, since def bar: => Int is not defined 
one error found

It is allowed in Scalac

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