Closed catwell closed 1 year ago
Teal Playground URL: https://567--teal-playground-preview.netlify.app
I had no strong feelings myself about supporting or not this Lua idiom, but I suppose it is consistent and unambiguous enough, and given the finished PR, I'm happy to merge it :)
Consider this code sample:
Before this change it would fail with:
This change makes it valid again (it was the case before 0.14).
Rationale: in Lua
function foo() end
is sugar forfoo = function() end
, and I suppose it should remain the same in Teal.This kind of code is useful to write mutually recursive functions such as this: