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
+19
View File
@@ -1068,6 +1068,25 @@ fn workspace_error_to_diagnostic(
"got_type": got_type,
})),
),
W::UnboundConstraintTypeVar {
class,
method,
constraint_class,
var,
} => Some(
ailang_check::Diagnostic::error(
"constraint-references-unbound-type-var",
format!(
"in class `{class}` method `{method}`: constraint `{constraint_class} {var}` references unbound type variable `{var}`"
),
)
.with_ctx(serde_json::json!({
"class": class,
"method": method,
"constraint_class": constraint_class,
"var": var,
})),
),
}
}