Re: confusing error message

  • From: Mike Pall <mike-1208@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 2 Aug 2012 23:17:32 +0200

Justin Cormack wrote:
> Which is very confusing as the error is not on line 13 (print(test(a,
> b)) where there is no cdata it is on line 7 when b is converted to a
> cdata which the bit library can't deal with. Looks like an
> optimisation confuses the error reporting.

Tail calls in Lua overwrite the callers frame. This is a feature
and not an optimization.

--Mike

Other related posts: