[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua BitOp test file causes exception?
- From: Mike Pall <mikelu-1010@...>
- Date: Tue, 5 Oct 2010 11:42:14 +0200
Joe Andresen wrote:
> anyone else get this using the source?
> bad argument #1 to '?' (number expected, got no value)
> line 22 of the test file:
> if pcall(f) or pcall(f, "z") or pcall(f, true) then
> where f is the function "tobit"
This shouldn't happen. This test is checking proper error
handling. So it does throw an error, but pcall ought to catch it
Try the following test:
This should give no error and no output. Similarly:
local bit = require("bit")
This should give no error and no output, too.
If any of the two tests fail, then your Lua VM has broken error
handling. Have you compiled Lua yourself or where have you
obtained a binary of it? Which version of Lua? Compiled with which
compiler version and running on which operating system?