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
if (!callbackParameterType.isPotentiallyNullable) {
In the callback parameter case, we add a null-check if the type is not potentially nullable, and in the return type case, we add a null-check if the type is potentially non-nullable. Both only handle some of the cases correctly. The right alternative for both cases is if the nullability is Nullability.nonNullable, place a null-check, and if it's Nullability.undetermined, cast.
The text was updated successfully, but these errors were encountered:
Our current handling of nullability of interop types are inconsistent:
sdk/pkg/dart2wasm/lib/js/util.dart
Line 115 in b4e30d1
sdk/pkg/dart2wasm/lib/js/callback_specializer.dart
Line 36 in b4e30d1
In the callback parameter case, we add a null-check if the type is not potentially nullable, and in the return type case, we add a null-check if the type is potentially non-nullable. Both only handle some of the cases correctly. The right alternative for both cases is if the nullability is
Nullability.nonNullable
, place a null-check, and if it'sNullability.undetermined
, cast.The text was updated successfully, but these errors were encountered: