Skip to content

Instantly share code, notes, and snippets.

@javierfernandes
Created August 25, 2020 22:38
Show Gist options
  • Save javierfernandes/a3aa30b7e53ba5a8b5480014d808c82b to your computer and use it in GitHub Desktop.
Save javierfernandes/a3aa30b7e53ba5a8b5480014d808c82b to your computer and use it in GitHub Desktop.
describe('x / y with x a nil value and y a number', function()
bne.project.set('x', nil)
bne.project.set('y', 12)
local left_expr = _.var_ref('x')
local ast = _.div_op(left_expr, _.var_ref('y'))
local err = __.unbound_error(left_expr, 'x')
doTest(bne.rule_context.new_context({}), ast, err)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment