JarrettBillingsley / Croc

Croc is an extensible extension language in the vein of Lua, which also wishes it were a standalone language. Also it's fun.
http://www.croc-lang.org
79 stars 12 forks source link

Function name guessing should also work when assigning a function literal into a field/var #79

Closed JarrettBillingsley closed 10 years ago

JarrettBillingsley commented 11 years ago

This code:

local f = function() {}
local t = {}
t.f = function() {}
writeln(nameOf(f))
writeln(nameOf(t.f))

Currently prints two autogenerated names for the functions, but the compiler really should be able to name them both "f".