Repository: flex-falcon Updated Branches: refs/heads/develop e94f6bf6f -> 920b1d25a
FLEX-35104 fix static binding code generation Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/920b1d25 Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/920b1d25 Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/920b1d25 Branch: refs/heads/develop Commit: 920b1d25a4665111a877ece250e3fdb254769686 Parents: e94f6bf Author: Alex Harui <aha...@apache.org> Authored: Fri Jul 1 13:08:46 2016 -0700 Committer: Alex Harui <aha...@apache.org> Committed: Fri Jul 1 13:08:46 2016 -0700 ---------------------------------------------------------------------- .../apache/flex/compiler/internal/as/codegen/BindableHelper.java | 3 ++- .../java/org/apache/flex/compiler/internal/scopes/ASScope.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/920b1d25/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/BindableHelper.java ---------------------------------------------------------------------- diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/BindableHelper.java b/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/BindableHelper.java index 18e5851..a12ccb6 100644 --- a/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/BindableHelper.java +++ b/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/BindableHelper.java @@ -374,7 +374,7 @@ public class BindableHelper mi.setMethodName(NAME_DISPATCH_EVENT.getBaseName()); Vector<Name> paramTypes = new Vector<Name>(5); - paramTypes.add(NAME_EVENT); + paramTypes.add(NAME_FLASH_EVENT); mi.setParamTypes(paramTypes); @@ -565,6 +565,7 @@ public class BindableHelper public static Name NAME_EVENT = new Name(CONSTANT_Qname, new Nsset(new Namespace(CONSTANT_PackageNs, "flash.events")), "Event"); + public static Name NAME_FLASH_EVENT = new Name(CONSTANT_Qname, new Nsset(new Namespace(CONSTANT_PackageNs, "flash.events")), "Event"); private static final Name NAME_ADDEVENT_LISTENER = new Name("addEventListener"); private static final Name NAME_DISPATCH_EVENT = new Name("dispatchEvent"); private static final Name NAME_HAS_EVENT_LISTENER = new Name("hasEventListener"); http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/920b1d25/compiler/src/main/java/org/apache/flex/compiler/internal/scopes/ASScope.java ---------------------------------------------------------------------- diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/scopes/ASScope.java b/compiler/src/main/java/org/apache/flex/compiler/internal/scopes/ASScope.java index 84b6aa1..953f14b 100644 --- a/compiler/src/main/java/org/apache/flex/compiler/internal/scopes/ASScope.java +++ b/compiler/src/main/java/org/apache/flex/compiler/internal/scopes/ASScope.java @@ -1614,7 +1614,7 @@ public abstract class ASScope extends ASScopeBase /** * Determine if any of the definitions in this scope are Bindable * - * @return true, if any definitions in this scope are explicitly marked + * @return true, if any non-static definitions in this scope are explicitly marked * bindable, false if there are none. */ public boolean hasAnyBindableDefinitions() @@ -1625,7 +1625,7 @@ public abstract class ASScope extends ASScopeBase for (int i = 0; i < n; i++) { IDefinition d = set.getDefinition(i); - if (d.isBindable()) + if (d.isBindable() && !d.isStatic()) return true; } }