Skip to content

REPL "not a companion" warning wrongly flags class/method, class/val pairs #6439

@scabug

Description

@scabug
scala> class C
defined class C

scala> def C = 0
C: Int
warning: previously defined class C is not a companion to method C.
Companions must be defined together; you may wish to use :paste mode for this.

scala> object D
defined module D

scala> def D = 0
D: Int

scala> class E
defined class E

scala> val E = 0
E: Int = 0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions