anchor.diff:  ''', [
         error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 23, 3),
       ]);
  -    assertMethodInvocation2(
  -      findNode.methodInvocation('toString()'),
  -      element: null,
  -      typeArgumentTypes: [],
  -      invokeType: 'dynamic',
  -      type: 'dynamic',
  -    );
  +
  +    var node = findNode.methodInvocation('toString()');
  +    if (isNullSafetyEnabled) {
  +      assertResolvedNodeText(node, r'''
  +MethodInvocation
  +  target: SimpleIdentifier
  +    token: foo
  +    staticElement: foo@16
  +    staticType: void
  +  operator: ?.
  +  methodName: SimpleIdentifier
  +    token: toString
  +    staticElement: <null>
  +    staticType: dynamic
  +  argumentList: ArgumentList
  +    leftParenthesis: (
  +    rightParenthesis: )
  +  staticInvokeType: dynamic
  +  staticType: dynamic
  +''');
  +    } else {
  +      assertResolvedNodeText(node, r'''
  +MethodInvocation
  +  target: SimpleIdentifier
  +    token: foo
  +    staticElement: foo@16
  +    staticType: void
  +  operator: ?.
  +  methodName: SimpleIdentifier
  +    token: toString
  +    staticElement: <null>
  +    staticType: dynamic
  +  argumentList: ArgumentList
  +    leftParenthesis: (
  +    rightParenthesis: )
  +  staticInvokeType: dynamic
  +  staticType: dynamic
  +''');
  +    }
     }
   
     test_error_wrongNumberOfTypeArgumentsMethod_01() async {
  
positive.code: }
  ''');
  
      assertTypeArgumentTypes(
        findNode.methodInvocation('foo(o)'),
        ['Object'],
      );
    }
  
    test_typeArgumentTypes_generic_inferred_leftTop_void() async {
  
negative.code:           error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 45, 17),
          ], legacy: []));
  
      var node = findNode.methodInvocation('h(a');
      if (isNullSafetyEnabled) {
        assertResolvedNodeText(node, r'''
  MethodInvocation
    methodName: SimpleIdentifier
      token: h
      staticElement: self::@function::h
      staticType: dynamic Function(int)
    argumentList: ArgumentList
      leftParenthesis: (
      arguments
        MethodInvocation
          target: SimpleIdentifier
            token: a
            staticElement: a@36
            staticType: double
          operator: .
          methodName: SimpleIdentifier
            token: clamp
            staticElement: dart:core::@class::num::@method::clamp
            staticType: num Function(num, num)
          argumentList: ArgumentList
            leftParenthesis: (
            arguments
              MethodInvocation
                methodName: SimpleIdentifier
                  token: f
                  staticElement: self::@function::f
                  staticType: T Function<T>()
                argumentList: ArgumentList
                  leftParenthesis: (
                  rightParenthesis: )
                staticInvokeType: num Function()
                staticType: num
                typeArgumentTypes
                  num
              MethodInvocation
                methodName: SimpleIdentifier
                  token: f
                  staticElement: self::@function::f
                  staticType: T Function<T>()
                argumentList: ArgumentList
                  leftParenthesis: (
                  rightParenthesis: )
                staticInvokeType: num Function()
                staticType: num
                typeArgumentTypes
                  num
            rightParenthesis: )
          staticInvokeType: num Function(num, num)
          staticType: num
      rightParenthesis: )
    staticInvokeType: dynamic Function(int)
    staticType: dynamic
  ''');
      } else {
        assertResolvedNodeText(node, r'''
  MethodInvocation
    methodName: SimpleIdentifier
      token: h
      staticElement: self::@function::h
      staticType: dynamic Function(int*)*
    argumentList: ArgumentList
      leftParenthesis: (
      arguments
        MethodInvocation
          target: SimpleIdentifier
            token: a
            staticElement: a@36
            staticType: double*
          operator: .
          methodName: SimpleIdentifier
            token: clamp
            staticElement: MethodMember
              base: dart:core::@class::num::@method::clamp
              isLegacy: true
            staticType: num* Function(num*, num*)*
          argumentList: ArgumentList
            leftParenthesis: (
            arguments
              MethodInvocation
                methodName: SimpleIdentifier
                  token: f
                  staticElement: self::@function::f
                  staticType: T* Function<T>()*
                argumentList: ArgumentList
                  leftParenthesis: (
                  rightParenthesis: )
                staticInvokeType: num* Function()*
                staticType: num*
                typeArgumentTypes
                  num*
              MethodInvocation
                methodName: SimpleIdentifier
                  token: f
                  staticElement: self::@function::f
                  staticType: T* Function<T>()*
                argumentList: ArgumentList
                  leftParenthesis: (
                  rightParenthesis: )
                staticInvokeType: num* Function()*
                staticType: num*
                typeArgumentTypes
                  num*
            rightParenthesis: )
          staticInvokeType: num* Function(num*, num*)*
          staticType: num*
      rightParenthesis: )
    staticInvokeType: dynamic Function(int*)*
    staticType: dynamic
  ''');
      }
    }
  
    test_clamp_double_context_none() async {
  