[fine] Name the type comparison method properly

This commit is contained in:
John Doty 2024-01-25 22:09:59 -08:00
parent e66ffbb5ae
commit 36ed61b8bb
2 changed files with 43 additions and 32 deletions

View file

@ -449,7 +449,7 @@ fn compile_binary_expression(c: &mut Compiler, t: TreeRef, tr: &Tree) -> CR {
}
TokenKind::EqualEqual => {
compile_simple_binary_expression(c, tr, |c, arg_type| {
if c.semantics.type_compat(&arg_type, &Type::Nothing) {
if c.semantics.can_convert(&arg_type, &Type::Nothing) {
c.push(Instruction::Discard);
c.push(Instruction::Discard);
Instruction::PushTrue