From 3c12178f79f829798292f8eb7910c2c3402ed8f1 Mon Sep 17 00:00:00 2001 From: herr kaste Date: Tue, 2 Feb 2016 23:45:28 +0100 Subject: [PATCH] Proper implementation Replace ad hoc hack with a proper implementation. --- src/standard/annotations.html | 7 ++----- src/standard/effectBuilder.html | 8 ++++++++ test/unit/bind.html | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/standard/annotations.html b/src/standard/annotations.html index 7ec8548ff1..8c14137fa9 100644 --- a/src/standard/annotations.html +++ b/src/standard/annotations.html @@ -147,11 +147,8 @@ if (!p.literal) { var signature = this._parseMethod(p.value); if (signature) { - var method = signature.method; - if (this.properties[method]) { - var args = signature.args || []; - args.push(this._parseArg(method)); - signature.args = args; + if (this.properties[signature.method]) { + signature.dynamicFn = true; signature.static = false; } p.signature = signature; diff --git a/src/standard/effectBuilder.html b/src/standard/effectBuilder.html index 493a7c12ff..0363527581 100644 --- a/src/standard/effectBuilder.html +++ b/src/standard/effectBuilder.html @@ -171,6 +171,14 @@ arg); } } + if (sig.dynamicFn) { + // trigger=null is sufficient as long as we don't allow paths to be + // used. If we change our mind, we must first implement this in the + // effects anyway where we basically do a `fn = this[methodName]` at + // the moment. + this.__addAnnotatedComputationEffect( + sig.method, index, note, part, null); + } } }, diff --git a/test/unit/bind.html b/test/unit/bind.html index 752b5cfe13..c13ed6fcda 100644 --- a/test/unit/bind.html +++ b/test/unit/bind.html @@ -285,7 +285,7 @@