Expand description
Canonical builtin-method name tables.
These lists mirror the method-dispatch match arms in the VM
(crates/harn-vm/src/vm/methods/*.rs). They are the single source of
truth the typechecker uses to decide whether a receiver.method() call
names a method that actually exists on a concrete builtin receiver, so
that "x".frobnicate() / (3.14).frobnicate() fail harn check instead
of crashing (strings/lists/sets) or silently returning nil (numbers) at
runtime.
Drift guard: the drift_guard_tests in harn-vm’s methods/dispatch.rs
assert both directions. Every name here must be accepted by the
corresponding VM dispatch (a stale entry would let a crashing call pass
harn check), and every VM dispatch arm must be listed here (a missing
entry would be a false “unknown method”). When you add a method to a VM
dispatch, add its name to the matching list below.
Constants§
- DICT_
METHODS dictreceiver methods (call_dict_method_sync+call_dict_method), plus.iter(). Dicts are not directly existence-checked (a dict may store a callable under a key and be invoked asd.field()), but their method names still belong to the recognized-method universe.- GENERATOR_
METHODS - Generator / stream drive methods (
call_generator_method). - ITER_
METHODS Iter<T>combinators and sinks (call_iter_method+ the lazy-iter arms ininfer_type). Part of the recognized-method universe.- LIST_
METHODS listreceiver methods (call_list_method_sync+call_list_method), plus.iter().- RANGE_
METHODS rangereceiver methods (call_range_method_sync), plus.iter().- SET_
METHODS setreceiver methods (call_set_method_sync+call_set_method), plus.iter().- STRING_
METHODS stringreceiver methods (call_string_method), plus the universal.iter()bridge thatcall_method_synchandles for every iterable.