Skip to content

forbid default values for extension parameters #12460

Closed
@unkarjedy

Description

@unkarjedy

Compiler version

scalaVersion := "3.0.0-RC3"

Minimized code

Currently this compiles fine:

extension (x: String = "123")
  def f2 = x.reverse

Expectation

Seems that there are no use cases for it and only misleads
Probably a compiler error should be shown here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions