Skip to content

Commit

Permalink
[Fix] Replaces call to deprecated method Name.name. (flutter#21241)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement Skau authored Sep 25, 2020
1 parent faeff0a commit 7dfcde1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flutter_frontend_server/lib/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class ToStringVisitor extends RecursiveVisitor<void> {
@override
void visitProcedure(Procedure node) {
if (
node.name.name == 'toString' &&
node.name.text == 'toString' &&
node.enclosingClass != null &&
node.enclosingLibrary != null &&
!node.isStatic &&
Expand Down
2 changes: 1 addition & 1 deletion flutter_frontend_server/test/to_string_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void main(List<String> args) async {
final ReturnStatement replacement = verify(body.replaceWith(captureAny)).captured.single as ReturnStatement;
expect(replacement.expression, isA<SuperMethodInvocation>());
final SuperMethodInvocation superMethodInvocation = replacement.expression as SuperMethodInvocation;
expect(superMethodInvocation.name.name, 'toString');
expect(superMethodInvocation.name.text, 'toString');
}

test('ToStringVisitor replaces toString in specified libraries (dart:ui)', () {
Expand Down

0 comments on commit 7dfcde1

Please sign in to comment.