iter 22b.2.2: kind-mismatch class-schema diagnostic

This commit is contained in:
2026-05-09 17:45:27 +02:00
parent 04bde14a9e
commit 928deb9d74
4 changed files with 152 additions and 8 deletions
+20
View File
@@ -1029,6 +1029,26 @@ fn workspace_error_to_diagnostic(
"method": method,
})),
),
W::KindMismatch {
class,
param,
method,
defining_module,
} => Some(
ailang_check::Diagnostic::error(
"kind-mismatch",
format!(
"kind mismatch in class `{class}`: parameter `{param}` is used in applied position \
inside method `{method}` (Decision 11 axis 5: class params are kind `*` only)"
),
)
.with_ctx(serde_json::json!({
"class": class,
"param": param,
"method": method,
"defining_module": defining_module,
})),
),
}
}