Skip to content

Jass2Lua side effects #43

@speige

Description

@speige

Some identical code behaves differently between jass & lua. Example:
-2147483648 - 1
jass: 2147483647 [wraps to positive]
lua: -2147483648 [can't go any smaller]

I can patch some things with metatables, for example:
(getmetatable("") or {}).__add = function(...) end

But, integers don't have a metatable, so a much more complicated & ugly workaround is necessary.
Many maps won't ever see these side-effects, but should attempt to detect them & either correct them or warn user.

Jass unit tests for example possible side effects is attached:
jass2luaSideEffects_jass.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions