Skip to content

Undetected uninitialized variables #650

@gabrielsferre

Description

@gabrielsferre

There's a bug in the Pallene compiler where illegal uninitialized variables may not be detected. To repeat the bug, compile the following code:

local function f():integer
    local a:integer
    a = a + 1
    return a
end

In this example, the Pallene compiler should raise an error saying a is used uninitialized, but it doesn't (the C compiler I'm using detects the error, tho).

This happens because uninitialized.lua queries the set of uninitalized variables for a given command only after the set is updated by that same command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions