From 6afcc54a6c80f9ff9ac1f36d2b0597976e9b2ff8 Mon Sep 17 00:00:00 2001 From: Dima Granetchi Date: Sun, 28 Dec 2014 15:22:07 +0200 Subject: [PATCH] ignore interfaces (TODO: chech interfaces meta) --- src/bindx/BindMacros.hx | 12 +++++++++--- test/InheritanceTest.hx | 7 ++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/bindx/BindMacros.hx b/src/bindx/BindMacros.hx index 3007d78..6ca9c25 100644 --- a/src/bindx/BindMacros.hx +++ b/src/bindx/BindMacros.hx @@ -31,14 +31,20 @@ class BindMacros { macro static public function buildIBindable():Array { var type = Context.getLocalType(); if (processed.indexOf(type) > -1) { - return null; + return null; } processed.push(type); + + var classType = type.getClass(); + + if (classType.isInterface) { + return null; + } + if (bindingSignalProvider == null) { bindingSignalProvider = new bindx.BindSignal.BindSignalProvider(); } - - var classType = type.getClass(); + var fields = Context.getBuildFields(); var meta = classType.bindableMeta(); diff --git a/test/InheritanceTest.hx b/test/InheritanceTest.hx index aa2616d..884b4a1 100644 --- a/test/InheritanceTest.hx +++ b/test/InheritanceTest.hx @@ -41,13 +41,14 @@ class InheritanceTest extends BuddySuite { } interface IIBindable extends IBindable { - + @:bindable + var i(default, set):Int; } -@:bindable class BindableParent implements IIBindable { public function new() {} - + + @:bindable public var i:Int; }