GNOME Bugzilla – Bug 652763
Calling a generic async method of an abstract class on a non-generic subclass instance crashes valac
Last modified: 2011-06-17 10:59:29 UTC
The following test case is crashing valac for me: public abstract class Abstract<T> : Object { public async List<T> my_method () { return new List<T> (); } } public class Subclass : Abstract<string> { } void main () { var foo = new Subclass (); foo.my_method.begin ((o, r) => { var result = foo.my_method.end (r); }); } gives the following crash: (gdb) run --pkg gio-2.0 test.vala Starting program: /opt/gnome2/build/bin/valac --pkg gio-2.0 test.vala [Thread debugging using libthread_db enabled] ** ERROR:valasemanticanalyzer.c:3898:vala_semantic_analyzer_get_actual_type: assertion failed: (instance_type != NULL) Program received signal SIGABRT, Aborted. 0x00110416 in __kernel_vsyscall () Missing separate debuginfos, use: debuginfo-install glibc-2.14-2.i686 libffi-3.0.9-2.fc15.i686 (gdb) t a a bt
+ Trace 227497
Thread 1 (Thread 0xb7fe36c0 (LWP 6182))
This is with git (master, ba518e654c4fad32dc4cecfb31b5dd19be3b2da4) from a few days ago.
commit e63a6456521bf4c6202339a68a1bfa09015da5a8 Author: Jürg Billeter <j@bitron.ch> Date: Fri Jun 17 12:48:32 2011 +0200 Fix .begin and .end on async methods using generic types Fixes bug 652763.