ResolvedBinding class

A binding check with everything that does not depend on the value already resolved — the product of InterpretedFunction.resolveBinding.

Exists so a loop can resolve its annotation once and check many values against it; see InterpretedFunction.resolveBinding for the measurement that motivated the split.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(Environment env, Object? value) → Object?
The value to bind — value unchanged, or its double widening — or throws D4rtTypeError when value cannot inhabit the declared type.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

declaresDouble(STypeAnnotation? type) → bool
Whether type is written double or double? - a binding whose values widen turns into doubles (ghissues32).
widen(String declaredName, Object? value) → Object?
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).