[Vala] bug in terniary conditionial



Theres a problem when using terniary conditional operator (?) when
freeing the resources.. It works once.. but not twice, so it makes
a double free.

Here's the snippet:

------------------------------------
using GLib;

class terti
{
        public static string miau(bool a)
        {
                return a?"1":"0";
        }

        public static void main(string[] args)
        {
                stdout.printf(miau(true));
                stdout.printf(miau(false));
        }
}
---------------------------------------

  --pancake



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