feat: implement And type overloading

This commit is contained in:
Shunsuke Shibayama 2023-04-24 21:43:46 +09:00
parent 068ffcc34f
commit 0e8dee3cbf
8 changed files with 125 additions and 13 deletions

View file

@ -924,6 +924,10 @@ pub trait ErrorDisplay {
for sub_msg in &core.sub_messages {
msg += &sub_msg.format_code_and_pointer(self, color, gutter_color, mark, chars);
}
if core.sub_messages.is_empty() {
let sub_msg = SubMessage::ambiguous_new(self.core().loc, vec![], None);
msg += &sub_msg.format_code_and_pointer(self, color, gutter_color, mark, chars);
}
msg += &core.kind.to_string();
msg += ": ";
msg += &core.main_message;