[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:
Nicholas Shahan 2022-05-05 17:36:55 +00:00 committed by Commit Bot
parent 477b3a1cbd
commit 25c3f36d95

View file

@ -75,9 +75,8 @@ class Rti {
}
@pragma('dart2js:tryInline')
static bool _asCheck(Rti rti, Object? object) {
return JS(
'bool', '#.#(#)', rti, JS_GET_NAME(JsGetName.RTI_FIELD_AS), object);
static Object? _asCheck(Rti rti, Object? object) {
return JS('', '#.#(#)', rti, JS_GET_NAME(JsGetName.RTI_FIELD_AS), object);
}
@pragma('dart2js:tryInline')
@ -916,7 +915,7 @@ Object? _simpleSpecializedIsTest(Rti testRti) {
///
/// The first time this default `_as` method is called, it replaces itself with
/// a specialized version.
bool _installSpecializedAsCheck(Object? object) {
Object? _installSpecializedAsCheck(Object? object) {
// This static method is installed on an Rti object as a JavaScript instance
// method. The Rti object is 'this'.
Rti testRti = _Utils.asRti(JS('', 'this'));