GNOME Bugzilla – Bug 554594
Using a struct with a ternary operation segfaults valac
Last modified: 2008-11-29 12:21:06 UTC
Please describe the problem: Using a struct with a ternary operation segfaults valac Steps to reproduce: using GLib; namespace Blah { public struct Bar{ int x; Bar(){ x=0; } } public class Foo: GLib.Object { public static Bar bar(){ return (false? Bar(): Bar()); } public static int main() { return 0; }// main }// Foo }// Blah Actual results: Segmentation fault. Expected results: Completed compilation. Does this happen every time? Yes. Other information:
2008-11-29 Jürg Billeter <j@bitron.ch> * vala/Makefile.am: * vala/valablock.vala: * vala/valacodenode.vala: * vala/valaconditionalexpression.vala: * vala/valadeclarationstatement.vala: * vala/valaexpression.vala: * vala/valanullchecker.vala: * vala/valastatementlist.vala: * gobject/valaccodebasemodule.vala: * gobject/valaccodegenerator.vala: * gobject/valaccodemodule.vala: Convert ternary conditionals into if statements, fixes bug 543870 and bug 554594 Fixed in r2083.