From e2ac290abd8ca6bae2136d34a7588ea202c13c96 Mon Sep 17 00:00:00 2001 From: Dima Granetchi Date: Sat, 8 Aug 2015 12:41:13 +0300 Subject: [PATCH] check error in notify --- src/bindx/macro/BindSignalProvider.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bindx/macro/BindSignalProvider.hx b/src/bindx/macro/BindSignalProvider.hx index 0ec1928..8c29d25 100644 --- a/src/bindx/macro/BindSignalProvider.hx +++ b/src/bindx/macro/BindSignalProvider.hx @@ -82,6 +82,8 @@ class BindSignalProvider implements IBindingSignalProvider { Context.error("method notify doesn't require newValue", newValue.pos); []; case FVar(_, _): + if (oldValue.isNullOrEmpty() && newValue.isNullOrEmpty()) + Context.error("method notify require oldValue and newValue", oldValue.pos); [oldValue, newValue]; } return dispatchSignal(expr, field.name, args, hasLazy(field.bindableMeta()));