Commit 1a061dd8 authored by Dan Field's avatar Dan Field Committed by Flutter GitHub Bot

Avoid runtimeType.toString in describeIdentity (#49087)

parent dc94e479
...@@ -9,6 +9,7 @@ import 'package:meta/meta.dart'; ...@@ -9,6 +9,7 @@ import 'package:meta/meta.dart';
import 'assertions.dart'; import 'assertions.dart';
import 'constants.dart'; import 'constants.dart';
import 'debug.dart'; import 'debug.dart';
import 'object.dart';
// Examples can assume: // Examples can assume:
// int rows, columns; // int rows, columns;
...@@ -2962,7 +2963,7 @@ String shortHash(Object object) { ...@@ -2962,7 +2963,7 @@ String shortHash(Object object) {
/// distinguish instances of the same class (hash collisions are /// distinguish instances of the same class (hash collisions are
/// possible, but rare enough that its use in debug output is useful). /// possible, but rare enough that its use in debug output is useful).
/// * [Object.runtimeType], the [Type] of an object. /// * [Object.runtimeType], the [Type] of an object.
String describeIdentity(Object object) => '${object.runtimeType}#${shortHash(object)}'; String describeIdentity(Object object) => '${objectRuntimeType(object, '<optimized out>')}#${shortHash(object)}';
// This method exists as a workaround for https://github.com/dart-lang/sdk/issues/30021 // This method exists as a workaround for https://github.com/dart-lang/sdk/issues/30021
/// Returns a short description of an enum value. /// Returns a short description of an enum value.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment