widen static method

Object? widen(
  1. String declaredName,
  2. Object? value
)

value as a binding declared declaredName holds it: an int bound to a double widens, as in Dart; every other value is unchanged. The one widening rule, shared by bind and the bindings that do not run a full check - fields, field formals, static and top-level variables (ghissues32).

Implementation

static Object? widen(String declaredName, Object? value) =>
    declaredName == 'double' && value is int ? value.toDouble() : value;