Skip to content

Commit 6ec5712

Browse files
committed
Discourage default arg for extension receiver (scala#22492)
Fixes scala#12460 I shied away from making it an error, as that is a language change that violates the rule that extension methods are ordinary methods. There are other restrictions, but an extension always allows explicit invocation `m()(x)` that could leverage a default. The caret is wrong on the second test case (~todo~). Edit: span of default getter was union of first parameter and the param RHS, so that the synthetic position of the getter symbol was a point at the first parameter. Now the getter tree gets the span of the RHS. (That span is non-synthetic, but the definition is still synthetic. The name pos of a synthetic is the point.) [Cherry-picked afb4806][modified]
1 parent ca1fb93 commit 6ec5712

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)