mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 17:59:39 +00:00
[ddc] Avoid unnecessary cast as Object
Change-Id: I96ffb4e91bf1656818fd5a71077f034a1acd1b93 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324641 Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Mark Zhou <markzipan@google.com>
This commit is contained in:
parent
ac04a4e4e2
commit
c4d2f64dd8
|
@ -1230,9 +1230,9 @@ void checkTypeBound(
|
|||
}
|
||||
|
||||
@notNull
|
||||
String typeName(type) {
|
||||
String typeName(Object? type) {
|
||||
if (JS<bool>('!', '# === void 0', type)) return 'undefined type';
|
||||
if (JS<bool>('!', '# === null', type)) return 'null type';
|
||||
if (type == null) return 'null type';
|
||||
if (JS_GET_FLAG('NEW_RUNTIME_TYPES')) {
|
||||
return rti.rtiToString(type);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue