resolveNode method

  1. @override
void resolveNode(
  1. ASTNode? parentNode
)
override

Implementation

@override
void resolveNode(ASTNode? parentNode) {
  super.resolveNode(parentNode);

  // Keyed on `thisParameter`, not on the marker type: the type is replaced by
  // the field's the first time this resolves, so a re-resolved (or decoded)
  // parameter no longer carries the marker.
  if (thisParameter && parentNode is ASTClassConstructorDeclaration) {
    var parentClass = parentNode.parentClass;
    var field = parentClass?.getField(fieldName);
    if (field != null) {
      if (identical(type, ASTTypeConstructorThis.instance)) {
        _type = field.type;
      }

      // Declared by an ancestor rather than by this class: `super.x`.
      if (!parentClass!.fieldsNames.contains(fieldName)) {
        _superParameter = true;
      }
    }
  }
}