While gcc just puts out a warning clang actually fails due to
-Werror=return-type.
https://bugzilla.gnome.org/show_bug.cgi?id=792942
var type_sym = (TypeSymbol) m.parent_symbol;
if (type_sym is ObjectTypeSymbol) {
ccode.add_declaration (get_ccode_name (type_sym) + "*", new CCodeVariableDeclarator ("result"));
+ return_type = ((ObjectTypeSymbol) type_sym).get_this_type ();
}
} else if (!(return_type is VoidType) && !return_type.is_real_non_null_struct_type ()) {
ccode.add_declaration (get_ccode_name (m.return_type), new CCodeVariableDeclarator ("result"));
asynchronous/bug777242.vala \
asynchronous/bug783543.vala \
asynchronous/bug792660.vala \
+ asynchronous/bug792942.vala \
asynchronous/closures.vala \
asynchronous/generator.vala \
asynchronous/yield.vala \
--- /dev/null
+class Foo {
+ public async Foo () throws Error {
+ }
+}
+
+async void run () {
+ try {
+ var foo = yield new Foo ();
+ } catch {
+ }
+}
+
+void main () {
+ run.begin ();
+}