[fine] More tests and also comparisons
This commit is contained in:
parent
55749af917
commit
7fb88ef199
5 changed files with 101 additions and 4 deletions
|
|
@ -723,6 +723,11 @@ impl<'a> Semantics<'a> {
|
|||
|
||||
(TokenKind::And | TokenKind::Or, Type::Bool, Type::Bool) => Some(Type::Bool),
|
||||
|
||||
(TokenKind::EqualEqual, Type::F64, Type::F64) => Some(Type::Bool),
|
||||
(TokenKind::EqualEqual, Type::String, Type::String) => Some(Type::Bool),
|
||||
(TokenKind::EqualEqual, Type::Bool, Type::Bool) => Some(Type::Bool),
|
||||
(TokenKind::EqualEqual, Type::Nothing, Type::Nothing) => Some(Type::Bool),
|
||||
|
||||
// This is dumb and should be punished, probably.
|
||||
(_, _, Type::Unreachable) => {
|
||||
self.report_error(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue