iter 22b.2.10: no-instance per-fn diagnostic

This commit is contained in:
2026-05-09 19:07:46 +02:00
parent b741a8ba05
commit 3600e82ec2
4 changed files with 152 additions and 3 deletions
+39
View File
@@ -0,0 +1,39 @@
{
"schema": "ailang/v0",
"name": "test_22b2_no_instance",
"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": "fn",
"name": "main",
"type": {
"k": "fn",
"params": [],
"ret": { "k": "con", "name": "Str" },
"effects": []
},
"params": [],
"body": {
"t": "app",
"fn": { "t": "var", "name": "show" },
"args": [{ "t": "lit", "lit": { "kind": "int", "value": 42 } }]
}
}
]
}