[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (rc2) now available
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 25 Dec 2014 10:58:54 -0200
> > math.sin(setmetatable({},{__name = 'number'}))
> sandbox:1: bad argument #1 to 'sin' (number expected, got number)
So, don't use the name of a basic type as the name of your type...
> Could this be changed to something like:
> "bad argument #%d to '%s' (%s (%s) expected, got %s (%s))"
> where each first %s is the base type (as returned by lua_typename),
> and the %s in parenthesis is the __name metafield?
And then get this?
bad argument #1 to 'sin' (number (number) expected, got number (number))