Skip to content

Warn when boxing value classes #12271

Open
@japgolly

Description

@japgolly

Most of us know that when you create a value class, there are cases in which the compiler will box/instantiate them. The specific rules are much less known than the fact that it can occasionally happen.

Could we please have an option for scalac to produce a warnings when it will box a value class? That way when we see the warnings we have the opportunity to either modify to our code to avoid boxing, or accept boxing by adding something @noWarn or @unchecked.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions