[vala] Report error when trying to disconnect lambda expression from signal
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Report error when trying to disconnect lambda expression from signal
- Date: Sat, 16 Oct 2010 08:21:59 +0000 (UTC)
commit b5485f6adad9d94ad298c8c63b8e3004321b8287
Author: Jürg Billeter <j bitron ch>
Date: Sat Oct 16 10:20:36 2010 +0200
Report error when trying to disconnect lambda expression from signal
Fixes bug 631022.
codegen/valagsignalmodule.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagsignalmodule.vala b/codegen/valagsignalmodule.vala
index eee3fc7..38e99bf 100644
--- a/codegen/valagsignalmodule.vala
+++ b/codegen/valagsignalmodule.vala
@@ -623,6 +623,9 @@ public class Vala.GSignalModule : GObjectModule {
}
} else {
// disconnect
+ if (handler is LambdaExpression) {
+ Report.error (handler.source_reference, "Cannot disconnect lambda expression from signal. Use Object.disconnect.");
+ }
if (sig is DynamicSignal) {
connect_func = get_dynamic_signal_disconnect_wrapper_name ((DynamicSignal) sig);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]