[vala] GAsync: Fix object creation expressions throwing errors
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] GAsync: Fix object creation expressions throwing errors
- Date: Fri, 16 Oct 2009 13:40:26 +0000 (UTC)
commit e123a81039ed422e2a4865861aef6f8d2035e82d
Author: Jürg Billeter <j bitron ch>
Date: Fri Oct 16 15:39:20 2009 +0200
GAsync: Fix object creation expressions throwing errors
Fixes bug 598677.
codegen/valaccodebasemodule.vala | 2 +-
tests/Makefile.am | 1 +
tests/asynchronous/bug598677.vala | 11 +++++++++++
3 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index a4fe54b..b3fbffa 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3777,7 +3777,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
if (expr.tree_can_fail) {
// method can fail
current_method_inner_error = true;
- creation_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("_inner_error_")));
+ creation_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_variable_cexpression ("_inner_error_")));
}
if (ellipsis) {
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e9be7e8..bb6ac8b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -63,6 +63,7 @@ TESTS = \
asynchronous/bug595755.vala \
asynchronous/bug596177.vala \
asynchronous/bug597294.vala \
+ asynchronous/bug598677.vala \
dbus/basic-types.test \
dbus/arrays.test \
dbus/async.test \
diff --git a/tests/asynchronous/bug598677.vala b/tests/asynchronous/bug598677.vala
new file mode 100644
index 0000000..444d6be
--- /dev/null
+++ b/tests/asynchronous/bug598677.vala
@@ -0,0 +1,11 @@
+public class Foo {
+ public Foo () throws Error {
+ }
+}
+
+public async void do_foo () throws Error {
+ new Foo ();
+}
+
+void main () {
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]