Skip to content
This repository was archived by the owner on Sep 14, 2024. It is now read-only.
This repository was archived by the owner on Sep 14, 2024. It is now read-only.

Inconsistent value comparisons #164

Open
@astrealRBLX

Description

@astrealRBLX

This is definitely a bug. I'm writing unit tests for my math interpreter and when attempting the following test it fails:

local lexer = Lexer.new('4.2 - 3.8')
lexer:tokenize()
local tree = Parser.new(lexer):parse()
local value = Interpreter:visit(tree)

expect(value).to.be.equal(0.4)

The error:
image

The values are identical. Of the 20+ tests I'm running this is the only one that fails. I'm really not sure why it is. I've triple checked my interpreter and the value is always returned correctly. This error only appears to occur with the subtract binary operation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions