You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/10/10 19:33:54 UTC

[royale-compiler] 08/08: also suppress binding warnings if proxy

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit d8f8b832a99da51e224565b2e2017977e193e90f
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Oct 10 12:28:54 2018 -0700

    also suppress binding warnings if proxy
---
 .../internal/codegen/databinding/WatcherAnalyzer.java      | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/WatcherAnalyzer.java b/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/WatcherAnalyzer.java
index 4fe0d22..4ef1189 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/WatcherAnalyzer.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/codegen/databinding/WatcherAnalyzer.java
@@ -217,18 +217,28 @@ public class WatcherAnalyzer
                 ITypeDefinition leftType= leftDef.resolveType(project);  
                 RoyaleProject project = (RoyaleProject)this.project;
                 String objectProxyClass = project.getObjectProxyClass();
-                boolean isProxy = leftType==null ? false : leftType.isInstanceOf(objectProxyClass, project);
+                boolean isObjectProxy = leftType==null ? false : leftType.isInstanceOf(objectProxyClass, project);
     
                 // If we are proxy.prop, we set this info into the parse state. This does two things:
                 //      1) tells downstream properties that they can be dynamic, and hence don't need
                 //          to be resolvable.
                 //      2) Stores off the event names from the proxy so that the chained property watchers
                 //          can use the info
-                if (isProxy)
+                if (isObjectProxy)
                 {
                     state.isObjectProxyExpression = true;
                     state.objectProxyEventNames = leftType.getBindableEventNames();
                 }
+                else
+                {
+                    String proxyClass = project.getProxyBaseClass();
+                    boolean isProxy = leftType==null ? false : leftType.isInstanceOf(proxyClass, project);
+                    if (isProxy)
+                    {
+                        state.isObjectProxyExpression = true;
+                        state.objectProxyEventNames = leftType.getBindableEventNames();
+                    }
+                }
             }
             doAnalyze(left, state);
             doAnalyze(right, state);