Open
Description
JSAnyUtilityExtension.isA<JSBoxedDartObject>()
returns true
unexpectedly for values that are not boxed objects when compiled to JS (I haven't tested under WASM). This can be reproduced with the following test:
import 'dart:js_interop';
import 'package:test/test.dart';
void main() {
group("isA()", () {
test("returns true for a JSBoxedDartObject", () {
expect(DateTime.now().toJSBox.isA<JSBoxedDartObject>(), isTrue);
});
test("returns false for a JSObject", () {
expect(JSObject().isA<JSBoxedDartObject>(), isFalse);
});
});
}
The first test case passes, the second fails. Tested with Dart 3.7.1.