iter 23.1.4: E2E fixture — bare LT match via implicit prelude import
This commit is contained in:
@@ -895,6 +895,19 @@ fn workspace_build_runs_imported_fn() {
|
||||
assert_eq!(stdout.trim(), "5", "ws_lib.add(2,3) should print 5");
|
||||
}
|
||||
|
||||
/// Guards Iter 23.1: `examples/ordering_match.ail.json` pattern-matches
|
||||
/// on the prelude `Ordering` ctor `LT` without an explicit prelude import.
|
||||
/// End-to-end: typecheck → codegen → link → run → stdout exactly `"1\n"`.
|
||||
/// Property: the implicit prelude import wired by `build_check_env` /
|
||||
/// `check_in_workspace` (Iter 23.1 Task 3) propagates through codegen so
|
||||
/// the bare ctor name `LT` resolves cross-module without an explicit
|
||||
/// `imports: ["prelude"]` entry in the source module.
|
||||
#[test]
|
||||
fn ordering_match_via_prelude_prints_1() {
|
||||
let stdout = build_and_run("ordering_match.ail.json");
|
||||
assert_eq!(stdout, "1\n");
|
||||
}
|
||||
|
||||
/// Guards Iter 5d: `ail manifest --workspace --json` lists defs from all
|
||||
/// modules of the workspace — visible via a `module` field per entry.
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user