Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Compiler allows empty argument lists for traits #6805

@scabug

Description

@scabug
scala> trait T
defined trait T

scala> class C extends T()
defined class C

scala> new T(){}
res0: T = $anon$1@3ffa1b16

scala> class C extends AnyRef with T()
<console>:1: error: traits or objects may not have parameters
       class C extends AnyRef with T()
                                    ^

Metadata

Metadata

Assignees

Labels

fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)has PR

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions