Skip to content

The type checker shouldn't report errors when an operand is typed `Unknown`

Type::Unknown should be considered a joker value. If an Unknown is encountered somewhere, an error should have already been emitted by the code that produced it. Cascading errors leads to useless errors such as:

   ╭─[tests/adder.lus:4:13]

 4 │     cout = (a and b) or (cin and (a xor b));
   │             ┬  
   │             ╰── expected bool, found {unknown}
───╯

here, since we've already been informed that a doesn't exist, there's no point in showing this message. And this isn't the only message, there is one per level of expression, which floods the console