anchor.diff:            error(CompileTimeErrorCode.UNDEFINED_GETTER, 42, 6),
           ]));
   
  -    assertMethodInvocation(
  -        findNode.methodInvocation('clamp'),
  -        elementMatcher(numElement.getMethod('clamp'),
  -            isLegacy: isLegacyLibrary),
  -        'num Function(num, num)',
  -        expectedType: typeStringByNullability(nullable: 'int', legacy: 'num'));
  +    var node = findNode.methodInvocation('clamp');
  +    if (isNullSafetyEnabled) {
  +      assertResolvedNodeText(node, r'''
  +MethodInvocation
  +  operator: ..
  +  methodName: SimpleIdentifier
  +    token: clamp
  +    staticElement: dart:core::@class::num::@method::clamp
  +    staticType: num Function(num, num)
  +  argumentList: ArgumentList
  +    leftParenthesis: (
  +    arguments
  +      SimpleIdentifier
  +        token: b
  +        staticElement: b@13
  +        staticType: int
  +      SimpleIdentifier
  +        token: c
  +        staticElement: c@20
  +        staticType: int
  +    rightParenthesis: )
  +  staticInvokeType: num Function(num, num)
  +  staticType: int
  +''');
  +    } else {
  +      assertResolvedNodeText(node, r'''
  +MethodInvocation
  +  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
  +      SimpleIdentifier
  +        token: b
  +        staticElement: b@13
  +        staticType: int*
  +      SimpleIdentifier
  +        token: c
  +        staticElement: c@20
  +        staticType: int*
  +    rightParenthesis: )
  +  staticInvokeType: num* Function(num*, num*)*
  +  staticType: num*
  +''');
  +    }
     }
   
     test_clamp_int_int_int_via_extension_explicit() async {
  
positive.code: ''', [
        error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD, 29, 5),
      ]);
      assertMethodInvocation(
        findNode.methodInvocation('foo<int>()'),
        findElement.topFunction('foo'),
        'void Function()',
      );
      assertNamedType(findNode.namedType('int>'), intElement, 'int');
    }
  
  
negative.code: }
  ''');
  
      var node = findNode.methodInvocation('toString();');
      if (isNullSafetyEnabled) {
        assertResolvedNodeText(node, r'''
  MethodInvocation
    target: SimpleIdentifier
      token: f
      staticElement: self::@function::f
      staticType: void Function()
    operator: .
    methodName: SimpleIdentifier
      token: toString
      staticElement: dart:core::@class::Object::@method::toString
      staticType: String Function()
    argumentList: ArgumentList
      leftParenthesis: (
      rightParenthesis: )
    staticInvokeType: String Function()
    staticType: String
  ''');
      } else {
        assertResolvedNodeText(node, r'''
  MethodInvocation
    target: SimpleIdentifier
      token: f
      staticElement: self::@function::f
      staticType: void Function()*
    operator: .
    methodName: SimpleIdentifier
      token: toString
      staticElement: MethodMember
        base: dart:core::@class::Object::@method::toString
        isLegacy: true
      staticType: String* Function()*
    argumentList: ArgumentList
      leftParenthesis: (
      rightParenthesis: )
    staticInvokeType: String* Function()*
    staticType: String*
  ''');
      }
    }
  
    test_remainder_int_context_cascaded() async {
  