You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing dynamic access to record fields (each field is exposed as a getter, and all getters can be called from dynamic), I noticed that there are no corresponding co19 tests for that. However this is a non-trivial part of the records implementation. In general, we should try to ensure that dynamic semantics at run time matches semantics of corresponding statically typed code (except extensions and similar static features).
So consider adding tests for accessing record fields dynamically, including function calls via field (dynamic x = (foo: myFunc); x.foo(42); should call myFunc(42)).
While implementing dynamic access to record fields (each field is exposed as a getter, and all getters can be called from
dynamic
), I noticed that there are no corresponding co19 tests for that. However this is a non-trivial part of the records implementation. In general, we should try to ensure thatdynamic
semantics at run time matches semantics of corresponding statically typed code (except extensions and similar static features).So consider adding tests for accessing record fields dynamically, including function calls via field (
dynamic x = (foo: myFunc); x.foo(42);
should callmyFunc(42)
).Example of such test in Dart SDK: https://github.com/dart-lang/sdk/blob/main/tests/language/records/simple/dynamic_field_access_test.dart.
The text was updated successfully, but these errors were encountered: