anchor.diff:    Result<List<hir.Expression>, List<ReportedCompilerError>> lowerIdentifier(
       ast.Identifier expression,
     ) {
  -    final identifier = expression.value.name;
  -
  -    if (expressionType.isNone && identifier == 'print') {
  +    final name = expression.value.name;
  +
  +    if (expressionType.isNone && name == 'print') {
         return Ok([
           hir.Expression.identifier(
             getId(expression),
  
positive.code:   }
  
    @override
    Option<Identifier> resolveIdentifier(String name) {
      final result = _identifiers[name];
      if (result != null) return Some(result);
      return parent.value.resolveIdentifier(name);
    }
  
  
negative.code:   }
  
    @override
    List<hir.Identifier> resolveIdentifier(String name) {
      // resolve `this`
      if (name == 'this') {
        if (declarationId.isConstructor) {
          return [];
        } else if (declarationId.isFunction) {
          final function = getFunctionDeclarationHir(queryContext, declarationId);
          if (function.isStatic) return [];
        } else if (declarationId.isProperty) {
          final function = getPropertyDeclarationHir(queryContext, declarationId);
          if (function.isStatic) return [];
        } else {
          throw CompilerError.internalError(
            '`ContextContext` is not within a constructor, function or property: `$declarationId`.',
          );
        }
  
        if (!declarationId.hasParent) return [];
        final parent = declarationId.parent;
        if (parent.isTrait || parent.isImpl || parent.isClass) {
          return [hir.Identifier.this_()];
        }
        return [];
      }
  
      // resolve `field` in a getter/setter
      // TODO(JonasWanke): resolve `field` in property accessors
  
      // TODO: check whether properties/functions are static or not and whether we have an instance
  
      // search the current file (from the curent module to the root)
      assert(declarationId.hasParent);
      var moduleId = declarationIdToModuleId(queryContext, declarationId.parent);
      while (moduleIdToDeclarationId(queryContext, moduleId).resourceId ==
          resourceId) {
        final innerIds =
            getModuleDeclarationHir(queryContext, moduleId).innerDeclarationIds;
  
        final matches = innerIds
            .where((id) => id.simplePath.last.nameOrNull == name)
            .map((id) {
          hir.CandyType type;
          if (id.isFunction) {
            final functionHir = getFunctionDeclarationHir(queryContext, id);
            type = hir.CandyType.function(
              parameterTypes: [
                for (final parameter in functionHir.parameters) parameter.type,
              ],
              returnType: functionHir.returnType,
            );
          } else if (id.isProperty) {
            type = getPropertyDeclarationHir(queryContext, id).type;
          } else {
            throw CompilerError.unsupportedFeature(
              "Matched identifier `$name`, but it's neither a function nor a property.",
            );
          }
          return hir.Identifier.property(id, type);
        });
        if (matches.isNotEmpty) return matches.toList();
  
        if (moduleId.hasNoParent) break;
        moduleId = moduleId.parent;
      }
  
      return [];
    }
  
    @override
  