GNOME Bugzilla – Bug 645788
Async function with switch statement and compile error.
Last modified: 2011-03-27 15:40:37 UTC
When the following codes are compiled, the compile error is generated. ---------------------------------------------------------------- async void func() { switch (0) { case 0: int tmp; break; case 1: int tmp; break; } } void main() { func(); } ---------------------------------------------------------------- $ valac --pkg gio-2.0 bug3.vala bug3.vala:7.13-7.15: warning: local variable `tmp' declared but never used int tmp; ^^^ bug3.vala:10.13-10.15: warning: local variable `tmp' declared but never used int tmp; ^^^ /home/kentaro/work/VALA/bug3.vala.c:19:7: error: duplicate member ‘tmp’ error: cc exited with status 256 Compilation failed: 1 error(s), 2 warning(s)
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 596861 ***