dotty-feature-requests icon indicating copy to clipboard operation
dotty-feature-requests copied to clipboard

Need `precise` a way to disable widening that works on locals

Open Blaisorblade opened this issue 5 years ago • 0 comments

Writing final val x = foo disables widening in type inference. But this is not available on locals — yet, it'd be useful. The need for final on locals came up in https://github.com/lampepfl/dotty/issues/6633.

The earlier proposal for precise came up in https://github.com/lampepfl/dotty/issues/4214#issuecomment-377602090.

Blaisorblade avatar Jun 07 '19 20:06 Blaisorblade