Files
AILang/examples
Brummel e035eff8df test(series): RED pin for polymorphic RawBuf element-var forwarding
Base-tier enabling RED for the `series` milestone step 1 (#61). A
polymorphic fn that allocates `(new RawBuf n)` with no explicit
type-arg — element var solved purely from the enclosing ctor-field
type `(con RawBuf a)`, never from a value argument — checks clean but
fails `ail build --alloc=rc`: mono drops the check-phase solution for
`a`, defaults it to Unit, and codegen mints the unregistered
`RawBuf_new__Unit`. The fixture reads the element back via `RawBuf.get`
so a wrong specialisation is observable (the program must print the
stored `1.0`).

This is the precondition the user picked (option B) so Series can ship
as a pure AILang library extension over RawBuf while keeping the
model-0007 `(new Series (con Float) 3)` caller surface. The #51 fix
carried a WRITTEN `(con Int)` type-arg through mono; the
variable-via-expected-type case is the untouched gap.

RED: `ail check` exits 0; `ail build --alloc=rc` aborts with
`RawBuf_new__Unit has no registered intercept`. GREEN target: builds,
runs, prints `1.0`. The mono fix must not break the INTERCEPTS↔
(intrinsic) bijection or the Term::New↔pre_desugar_validation lockstep.

refs #61
2026-06-02 12:36:01 +02:00
..