iter 22b.2.4: constraint-references-unbound-type-var diagnostic

This commit is contained in:
2026-05-09 17:54:20 +02:00
parent 4b84e781d4
commit 257b47625d
3 changed files with 108 additions and 0 deletions
@@ -0,0 +1,30 @@
{
"schema": "ailang/v0",
"name": "test_22b2_unbound_constraint_var",
"imports": [],
"defs": [
{
"kind": "class",
"name": "Foo",
"param": "a",
"methods": [
{
"name": "foo",
"type": {
"k": "forall",
"vars": ["a"],
"constraints": [
{ "class": "Bar", "type": { "k": "var", "name": "z" } }
],
"body": {
"k": "fn",
"params": [{ "k": "var", "name": "a" }],
"ret": { "k": "con", "name": "Unit" },
"effects": []
}
}
}
]
}
]
}