Patch empty implicit parens on error recovery#22835
Conversation
|
Requires a tweak: an implicit param list is not supplied implicitly if an arg list is present (but defaults may be supplied in the explicit application). It must not continue implicit application when rewriting. Ha, in other words, |
6fe89ef to
cfa8e9f
Compare
|
Added a test case for rewrite of |
c184805 to
83fda42
Compare
KacperFKorban
left a comment
There was a problem hiding this comment.
Looks good. I just added two small comments about the code.
|
The spurious failure is cc timeout on posCC, negAll, runAll. |
ef81b4a to
da154fc
Compare
| case InfixTuple // r f (x1, ..., xN) where N != 1; needs to be treated specially for an error message in typedApply | ||
| case Regular // r.f(x) | ||
| case Using // r.f(using x) | ||
| case InfixTuple // r f (x1, ..., xN) where N != 1; needs to be treated specially for an error message in typedApply |
There was a problem hiding this comment.
This keeps the line under 120 chars, not a standard but nice to have when feasible. class Apply line wraps at that length; it would be nice to alias constructorOnly to cO or something like in chemistry K.
KacperFKorban
left a comment
There was a problem hiding this comment.
Looks good! Sorry for taking so long, this PR got lost in my notifications 🙈
da154fc to
dc178d0
Compare
Offer a rewrite for an erroneous application
f()where the parameter list isimplicitand a parameter lacks a default arg.This was never official syntax, but was accepted from 3.3.4/3.4.2 due to a bug. The rewrite is for 3.7-migration, using the existing
MigrationVersion.ImplicitParamsWithoutUsing, since that is a similar bit of syntax.Fixes #22792