iter 22b.2.6: method-name-collision diagnostic

This commit is contained in:
2026-05-09 18:07:52 +02:00
parent 1f6d2322c3
commit a9aa248910
4 changed files with 186 additions and 0 deletions
+19
View File
@@ -1104,6 +1104,25 @@ fn workspace_error_to_diagnostic(
"var": var,
})),
),
W::MethodNameCollision {
method,
kind,
first_origin,
second_origin,
} => Some(
ailang_check::Diagnostic::error(
"method-name-collision",
format!(
"method name `{method}` collides ({kind}): defined in `{first_origin}` and `{second_origin}`"
),
)
.with_ctx(serde_json::json!({
"method": method,
"kind": kind,
"first_origin": first_origin,
"second_origin": second_origin,
})),
),
}
}