Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined error when having a for-loop be unreachable code #168

Open
falkecarlsen opened this issue May 16, 2019 · 1 comment
Open

Undefined error when having a for-loop be unreachable code #168

falkecarlsen opened this issue May 16, 2019 · 1 comment
Labels
bug-from-testing Something isn't working, found during testing

Comments

@falkecarlsen
Copy link
Member

Turns out the following if-else-for.cell program does not work:

world {
    size = 100 [wrap], 200 [wrap];
    tickrate = 1;
    cellsize = 5;
}

state ident (0, 0, 0) {
    become ident;
}

function f(int a) int {
    if (a == 1) {
        return a;
    } else {
        return a;
    }

    for (let x = a; x < a; x = x+1) {
        let y = 2;
    } 
    return a;
}
@falkecarlsen falkecarlsen added the bug-from-testing Something isn't working, found during testing label May 16, 2019
@falkecarlsen
Copy link
Member Author

This happens in the type-checker and probably during flow-check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-from-testing Something isn't working, found during testing
Projects
None yet
Development

No branches or pull requests

1 participant