| Index: pkg/compiler/lib/src/resolution/secret_tree_element.dart
|
| diff --git a/pkg/compiler/lib/src/resolution/secret_tree_element.dart b/pkg/compiler/lib/src/resolution/secret_tree_element.dart
|
| index 635ffe77b648865ba6f613b5c760344e2207a472..2cf99641d09549a3b985c489686efe91b0ff4a08 100644
|
| --- a/pkg/compiler/lib/src/resolution/secret_tree_element.dart
|
| +++ b/pkg/compiler/lib/src/resolution/secret_tree_element.dart
|
| @@ -22,8 +22,12 @@ import '../common.dart';
|
|
|
| /// Interface for associating
|
| abstract class TreeElementMixin {
|
| - Object get _element;
|
| - void set _element(Object value);
|
| + // We would prefer [resolutionSecretTreeElement] to be a private property, but
|
| + // that is a problem for DDC's separate compilation model where private
|
| + // overrides are disallowed.
|
| + // [See](https://github.com/dart-lang/sdk/issues/28809) for more context.
|
| + Object get resolutionSecretTreeElement;
|
| + void set resolutionSecretTreeElement(Object value);
|
| }
|
|
|
| /// Null implementation of [TreeElementMixin] which does not allow association
|
| @@ -33,20 +37,20 @@ abstract class TreeElementMixin {
|
| abstract class NullTreeElementMixin implements TreeElementMixin, Spannable {
|
| // Deliberately using [Object] here to thwart code completion.
|
| // You're not really supposed to access this field anyways.
|
| - Object get _element => null;
|
| - set _element(_) {
|
| + Object get resolutionSecretTreeElement => null;
|
| + set resolutionSecretTreeElement(_) {
|
| assert(invariant(this, false,
|
| message: "Elements cannot be associated with ${runtimeType}."));
|
| }
|
| }
|
|
|
| /// Actual implementation of [TreeElementMixin] which stores the associated
|
| -/// element in the private field [_element].
|
| +/// element in the private field [resolutionSecretTreeElement].
|
| ///
|
| /// This class is mixed into the node classes that are actually associated with
|
| /// elements.
|
| abstract class StoredTreeElementMixin implements TreeElementMixin {
|
| - Object _element;
|
| + Object resolutionSecretTreeElement;
|
| }
|
|
|
| /**
|
| @@ -55,12 +59,13 @@ abstract class StoredTreeElementMixin implements TreeElementMixin {
|
| *
|
| * Using [Object] as return type to thwart code completion.
|
| */
|
| -Object getTreeElement(TreeElementMixin node) => node._element;
|
| +Object getTreeElement(TreeElementMixin node) =>
|
| + node.resolutionSecretTreeElement;
|
|
|
| /**
|
| * Do not call this method directly. Instead, use an instance of
|
| * TreeElements.
|
| */
|
| void setTreeElement(TreeElementMixin node, Object value) {
|
| - node._element = value;
|
| + node.resolutionSecretTreeElement = value;
|
| }
|
|
|