[vala] Report error when using reference parameters in async methods
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Report error when using reference parameters in async methods
- Date: Sat, 20 Mar 2010 11:42:02 +0000 (UTC)
commit 8364f59c2226c8c39767ba654d3b30f6f1ab3ea2
Author: Jürg Billeter <j bitron ch>
Date: Sat Mar 20 12:40:40 2010 +0100
Report error when using reference parameters in async methods
Fixes bug 610624.
vala/valamethod.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index 04ec423..795baf0 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -812,6 +812,10 @@ public class Vala.Method : Member {
foreach (FormalParameter param in parameters) {
param.check (analyzer);
+ if (coroutine && param.direction == ParameterDirection.REF) {
+ error = true;
+ Report.error (param.source_reference, "Reference parameters are not supported for async methods");
+ }
}
foreach (DataType error_type in get_error_types ()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]