anchor.diff:        }
   
         return AstTestFactory.mapLiteral(keyword, typeArguments, entries);
  -    }
  -
  -    // Invalid initializers and  annotations are represented as Let.
  -    if (expr is kernel.Let) {
  -      var body = expr.body;
  -      if (_isStaticError(body)) {
  -        throw const _CompilationErrorFound();
  -      }
  -      if (body is kernel.Let) {
  -        var initializer = body.variable.initializer;
  -        if (initializer is kernel.Let && _isStaticError(initializer.body)) {
  -          throw const _CompilationErrorFound();
  -        }
  -      }
  -    }
  -
  -    // Stop if there is an error.
  -    if (_isStaticError(expr)) {
  -      throw const _CompilationErrorFound();
       }
   
       if (expr is kernel.StaticGet) {
  
positive.code: }
  
  /**
   * This exception is thrown when we detect that the Kernel has a compilation
   * error, so we cannot resynthesize the constant expression.
   */
  class _CompilationErrorFound {
    const _CompilationErrorFound();
  }
  
  /**
   * Builder of [Expression]s from [kernel.Expression]s.
   */
  class _ExprBuilder {
  
negative.code:     throw new ArgumentError(name);
    }
  
    static bool _hasInvalidExpression(kernel.Expression expr) {
      var visitor = new _HasInvalidExpressionVisitor();
      expr.accept(visitor);
      return visitor.result;
    }
  }
  
  class _HasInvalidExpressionVisitor extends kernel.RecursiveVisitor<void> {
    bool result = false;
  
    @override
    void visitInvalidExpression(kernel.InvalidExpression node) {
      result = true;
    }
  }
  
  