Skip to content

open object is allowed despite not doing anything #21760

Closed
@KacperFKorban

Description

@KacperFKorban

Compiler version

3.6.1-RC1-bin-20241011-5e7ab15-NIGHTLY

Minimized code

//> using scala 3.nightly
  
open object O // no effect

Output

Successful compilation.

Expectation

Warning or error that open objects trivially cannot be extended.

Other info

This check should most likely be done in Desugar.scala#checkModifiers or somewhere in Checking.scala (maybe checkWellFormed)

Metadata

Metadata

Assignees

Labels

SpreeSuitable for a future Spreearea:lintingLinting warnings enabled with -W or -Xlintitype:bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions