Skip to content

Deprecate nilary unary prefix operator #12055

@soronpo

Description

@soronpo

reproduction steps

using Scala 2.13.3-bin-d23424c

class Foo {
  def unary_~() : Foo = this
}
val f = new Foo
val f2 = ~f //deprecation warning for auto-application

problem

Now that auto-application is deprecated, a prefix with a nilary creates a warning that cannot be avoided while maintaining a prefix position (or permanently applying warning suppression). To resolve this, we need to deprecate this possibility from the definition site.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions