iter 22b.2.e2e: cross-module class resolution + multi-fn aggregation
Four new E2E tests in typeclass_22b2.rs covering invariants the per-task fixtures (all single-module, single-fn) did not exercise: - cross_module_class_method_resolves_and_fires_no_instance: module B's call to `show` (declared in module A) reaches the no-instance arm, proving Env.class_methods is merged workspace- wide and not restricted to the local module. - cross_module_polymorphic_fn_without_constraint_fires_missing_constraint: same merge guarantees the missing-constraint arm sees the residual produced by a call to A's class method from inside B. - cross_module_instance_satisfies_concrete_call: the workspace registry built at load time over all modules must populate keys visible from B; a concrete call resolves clean cross-module. - two_fns_each_missing_constraint_produce_two_diagnostics: pins check_in_workspace's per-def aggregation — two ill-formed fns produce two diagnostics (one per fn), not one. Six new fixtures (xmod_* trio + two_fns_*).
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"schema": "ailang/v0",
|
||||
"name": "test_22b2_xmod_classmod",
|
||||
"imports": [],
|
||||
"defs": [
|
||||
{
|
||||
"kind": "class",
|
||||
"name": "Show",
|
||||
"param": "a",
|
||||
"methods": [
|
||||
{
|
||||
"name": "show",
|
||||
"type": {
|
||||
"k": "fn",
|
||||
"params": [{ "k": "var", "name": "a" }],
|
||||
"ret": { "k": "con", "name": "Str" },
|
||||
"effects": []
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "instance",
|
||||
"class": "Show",
|
||||
"type": { "k": "con", "name": "Int" },
|
||||
"methods": [
|
||||
{
|
||||
"name": "show",
|
||||
"body": { "t": "lit", "lit": { "kind": "str", "value": "n" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user