Fixes an illegal override in KernelUnresolvedNameGenerator.

The signature of the overridden method buildCompoundAssignment in
KernelUnresolvedNameGenerator (c.f. kernel_expression_generator.dart)
was illegal, because its (named parameter) arity was four, whilst the
same method in one of its supertypes has arity five.

Furthermore, there was a signature conflict for
buildCompoundAssignment amongst the supertypes of
KernelUnresolvedNameGenerator:

   KernelUnresolvedNameGenerator
   extends KernelGenerator
           |
           = Generator with KernelExpressionGenerator
                            |
                            arity(buildCompoundAssignment) = 5
   with    ErroneousExpressionGenerator, UnresolvedNameGenerator.
           |
           arity(buildCompoundAssignment) = 4

In this CL the conflict is resolved by the "greatest common
denominator" approach, that is, now each implementation of
buildCompoundAssignment has arity five.

This CL is a necessary step towards fixing
https://github.com/dart-lang/sdk/issues/34235

Related change: c95ef874aa

Change-Id: If1992b8fb2bb994f83557c48fb0ac276b2d1a8d3
Reviewed-on: https://dart-review.googlesource.com/71520
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
This commit is contained in:
Daniel Hillerström 2018-08-27 13:32:30 +00:00 committed by commit-bot@chromium.org
parent f6242cb100
commit 8a99ab0c74
2 changed files with 4 additions and 2 deletions

View file

@ -793,7 +793,8 @@ abstract class ErroneousExpressionGenerator implements Generator {
{int offset: -1,
bool voidContext: false,
Procedure interfaceTarget,
bool isPreIncDec: false}) {
bool isPreIncDec: false,
bool isPostIncDec: false}) {
return new SyntheticExpressionJudgment(buildError(
forest.arguments(<Expression>[value], token, token),
isGetter: true));

View file

@ -1542,7 +1542,8 @@ class KernelUnresolvedNameGenerator extends KernelGenerator
{int offset: TreeNode.noOffset,
bool voidContext: false,
Procedure interfaceTarget,
bool isPreIncDec: false}) {
bool isPreIncDec: false,
bool isPostIncDec: false}) {
return _buildUnresolvedVariableAssignment(true, value);
}