TropicSapling/triforce

Parsing of some function calls is incorrect

Closed this issue · 0 comments

func f (int n) -> int {
    42
}

func init {
     println f 42;
}

The above code would not compile correctly because { would get f as a child instead of println.

EDIT: Actually no that code would compile correctly, this bug only applies to macro function calls used in a way like this:

macro func macro_func (int n) {
    return n;
}

func init {
    println macro_func 42;
}

EDIT 2: Actually, this bug only happens when functions do not specify that they return anything even though they do, which often is the case with macro functions. This seems to have to do with that 2 functions returning nothing have the same precedence.