anchor.diff:      b.documentationComment = serializeDocumentation(node.documentationComment);
       b.annotations = serializeAnnotations(node.metadata);
       b.codeRange = serializeCodeRange(node);
  -    Map<int, int> localClosureIndexMap = _withLocalClosureIndexMap(() {
  -      serializeFunctionBody(b, node.initializers, node.body);
  -    });
  +    Map<int, int> localClosureIndexMap = serializeFunctionBody(
  +        b, node.initializers, node.body, node.constKeyword != null);
       if (node.constKeyword != null) {
         Set<String> constructorParameterNames =
             node.parameters.parameters.map((p) => p.identifier.name).toSet();
  
positive.code:       b.documentationComment = serializeDocumentation(documentationComment);
        b.annotations = serializeAnnotations(annotations);
        b.codeRange = serializeCodeRange(variables.parent);
        Map<int, int> localClosureIndexMap = _withLocalClosureIndexMap(() {
          b.initializer = serializeInitializerFunction(variable.initializer);
        });
        if (variable.isConst ||
            variable.isFinal && isField && !isDeclaredStatic ||
            variables.type == null) {
          Expression initializer = variable.initializer;
          if (initializer != null) {
            b.initializer.bodyExpr =
                serializeConstExpr(localClosureIndexMap, initializer);
          }
        }
        if (variable.initializer != null &&
            (variables.isFinal || variables.isConst)) {
          b.propagatedTypeSlot = assignSlot();
  
negative.code:   }
  
    /**
     * Helper method to determine if a given [typeName] refers to `dynamic`.
     */
    static bool isDynamic(TypeName typeName) {
  