Akuli / jou

Yet another programming language
MIT License
12 stars 4 forks source link

unused variable detection not working? #422

Closed Akuli closed 9 months ago

Akuli commented 10 months ago
def main() -> int:
    input = parse_input()

    smallest = -1 as long
    for i = 0; i < input->n_seed_numbers; i++:
        n = input->seed_numbers[i]
        for k = 0; k < input->nmaps; k++:
            old_n = n
            n = input->maps[k].map_number(n)

        if smallest == -1 or n < smallest:
            smallest = n

    printf("%lld\n", smallest)
    return 0

I would expect warning message on line old_n = n

Akuli commented 9 months ago

Minimal example

def main() -> int:
    n = 7
    return 0