dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.21k stars 1.57k forks source link

DDC: html/js_typed_interop_type_test: RuntimeError #30947

Open jakobr-google opened 7 years ago

jakobr-google commented 7 years ago

tests/lib_2/html/js_typed_interop_type3_test.dart and js_typed_interop_type_test.dart both fail on DDC, with the following error:

Exception: Type 'NativeJavaScriptObject' is not a subtype of type 'JSObject<A>' in strong mode
jakobr-google commented 7 years ago

Tests being migrated here: https://dart-review.googlesource.com/c/sdk/+/9940

jmesserly commented 6 years ago

This might be by design. It's trying to assign an anonymous JS object to a non-anonymous JS object. I don't think that's allowed. The bug is on this line in the test Expect.equals(testA(d), 4); because d is a D which is not an A.

jmesserly commented 6 years ago

oops, I meant to link to the CL with the proposed test fix: https://dart-review.googlesource.com/c/sdk/+/53697