Files @ b4a9c41d70da
Branch filter:

Location: CSY/reowolf/testdata/parser/counterexamples/definition_order.pdl

MH
Initial casting implementation

Explicit casts can be performed with the syntax 'cast<type>(input)'
and implicit casts can be performed with the syntax 'cast(input)'
where the output type is determined by inference.

To prevent casting shenanigans we only allow casting of primitive
types and of types to themselves (essentially creating a copy).
#version 1
// My bad: C-ism of declarations on top

int call_me(int later) {
    return later;
}

int function() {
    int a = 2;
    int b = 3;

    int d = call_me(b); // succeeds, because of assignment
    call_me(b); // bare function call seems to work, unless we perform assignment afterwards

    int d = 5;

    return 2;
}