Re: [Vala] [BUG] Re: Closures and local variables



There is no error on compilation. But the result is quite surprising:
    sh$ valac closure.vala 
    sh$ ./closure
    1 2 1
    1 2 1

It returned '1 0 -1' for me. That's because valac actually generated invalid
C code with undefined behaviour.

Does Vala mandate any particular order
in evaluating arguments to a function call?
In f(a, b, c), are a, b, c evaluated in that
order?

If Vala doesn't specify the sequence, then
the undefined behaviour may be valid.

hand
Nor Jaidi Tuah






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]