| Index: pkg/analyzer/lib/src/generated/ast.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
|
| index f937b19babee1019a1905b68e52e06330394a0a4..bbc8076d2c86b4738c13e4b677fdcf7b0dab55c7 100644
|
| --- a/pkg/analyzer/lib/src/generated/ast.dart
|
| +++ b/pkg/analyzer/lib/src/generated/ast.dart
|
| @@ -5309,6 +5309,18 @@ class ConstantEvaluator extends GeneralizingAstVisitor<Object> {
|
| }
|
|
|
| /**
|
| + * Object representing a "const" instance creation expression, and its
|
| + * evaluation result. This is used as the AnalysisTarget for constant
|
| + * evaluation of instance creation expressions.
|
| + */
|
| +class ConstantInstanceCreationHandle {
|
| + /**
|
| + * The result of evaluating the constant.
|
| + */
|
| + EvaluationResultImpl evaluationResult;
|
| +}
|
| +
|
| +/**
|
| * A constructor declaration.
|
| *
|
| * > constructorDeclaration ::=
|
| @@ -10625,9 +10637,10 @@ class InstanceCreationExpression extends Expression {
|
| ConstructorElement staticElement;
|
|
|
| /**
|
| - * The result of evaluating this expression, if it is constant.
|
| + * The [ConstantInstanceCreationHandle] holding the result of evaluating this
|
| + * expression, if it is constant.
|
| */
|
| - EvaluationResultImpl evaluationResult;
|
| + ConstantInstanceCreationHandle constantHandle;
|
|
|
| /**
|
| * Initialize a newly created instance creation expression.
|
| @@ -10675,6 +10688,16 @@ class InstanceCreationExpression extends Expression {
|
| Token get endToken => _argumentList.endToken;
|
|
|
| /**
|
| + * The result of evaluating this expression, if it is constant.
|
| + */
|
| + EvaluationResultImpl get evaluationResult {
|
| + if (constantHandle != null) {
|
| + return constantHandle.evaluationResult;
|
| + }
|
| + return null;
|
| + }
|
| +
|
| + /**
|
| * Return `true` if this creation expression is used to invoke a constant
|
| * constructor.
|
| */
|
|
|