mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:58:29 +00:00
[dart2js] Fix return type on rti as methods
Change-Id: Idd96bf55b22d4f9c3072d1371b31ff4c0005afb7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243706 Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Stephen Adams <sra@google.com> Reviewed-by: Mayank Patke <fishythefish@google.com>
This commit is contained in:
parent
477b3a1cbd
commit
25c3f36d95
|
@ -75,9 +75,8 @@ class Rti {
|
||||||
}
|
}
|
||||||
|
|
||||||
@pragma('dart2js:tryInline')
|
@pragma('dart2js:tryInline')
|
||||||
static bool _asCheck(Rti rti, Object? object) {
|
static Object? _asCheck(Rti rti, Object? object) {
|
||||||
return JS(
|
return JS('', '#.#(#)', rti, JS_GET_NAME(JsGetName.RTI_FIELD_AS), object);
|
||||||
'bool', '#.#(#)', rti, JS_GET_NAME(JsGetName.RTI_FIELD_AS), object);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@pragma('dart2js:tryInline')
|
@pragma('dart2js:tryInline')
|
||||||
|
@ -916,7 +915,7 @@ Object? _simpleSpecializedIsTest(Rti testRti) {
|
||||||
///
|
///
|
||||||
/// The first time this default `_as` method is called, it replaces itself with
|
/// The first time this default `_as` method is called, it replaces itself with
|
||||||
/// a specialized version.
|
/// a specialized version.
|
||||||
bool _installSpecializedAsCheck(Object? object) {
|
Object? _installSpecializedAsCheck(Object? object) {
|
||||||
// This static method is installed on an Rti object as a JavaScript instance
|
// This static method is installed on an Rti object as a JavaScript instance
|
||||||
// method. The Rti object is 'this'.
|
// method. The Rti object is 'this'.
|
||||||
Rti testRti = _Utils.asRti(JS('', 'this'));
|
Rti testRti = _Utils.asRti(JS('', 'this'));
|
||||||
|
|
Loading…
Reference in a new issue