lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> @number[] does two things:
> If applied to a table constructor it converts the table to number[] which
> is a specialisation of the table. This is done by changing the op code from
> If applied to an expression that is not a constructor it generates a
> OP_RAVI_TOARRAYF instruction which will assert at runtime that the
> expression is of type number[].

In my view, the cleanest solution (but that needs more changes) would
be to introduce a new kind of expression, VCONSTRUCTOR.

-- Roberto