teal-language / tl

The compiler for Teal, a typed dialect of Lua
MIT License
2.15k stars 111 forks source link

auto-generate math.maxinteger and math.mininteger #490

Closed kikito closed 3 years ago

kikito commented 3 years ago

As discussed in #488

Without this change, math.maxinteger and math.mininteger would be accepted by Teal, but the generated Lua on PUC-Lua < 5.3 or LuaJIT without the compat module would not find it, resulting on a run-time error when attempting to use it.

The change makes Teal produce those two values, so they exist when compat is optional or required (they will not be provided by Teal when compat is off).

github-actions[bot] commented 3 years ago

Teal Playground URL: https://490--teal-playground.netlify.app

kikito commented 3 years ago

Thanks for the feedback, applied the changes, regenerated and fixed the tests. Let's see if it works ok now.

hishamhm commented 3 years ago

LGTM! Merged, thank you!!