lua-users home
lua-l archive

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

    local a = {};
    a[1] = (function() a = nil end)()

Crashes with error: assignment to nil.

Although not directly related to the topic at hand...

I think it's worthwhile to distinguish between throwing errors (handling things gracefully) and crashing (not so gracefully... ;-)).

In this case, Lua doesn't crash, it throws an error.