flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [03/14] git commit: [flex-falcon] [refs/heads/develop] - When searching for a setter, keep looking for a setter not just the first writable thing otherwise you may find the backing variable for a binding
Date Tue, 08 Oct 2013 21:50:03 GMT
When searching for a setter, keep looking for a setter not just the first writable thing otherwise
you may find the backing variable for a binding


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/838cbbec
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/838cbbec
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/838cbbec

Branch: refs/heads/develop
Commit: 838cbbece196b120beeba95ed5e05b45439e73f1
Parents: e25f845
Author: Alex Harui <aharui@apache.org>
Authored: Wed Oct 2 20:51:25 2013 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Oct 8 13:50:57 2013 -0700

----------------------------------------------------------------------
 .../flex/compiler/internal/projects/FlexProject.java     | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/838cbbec/compiler/src/org/apache/flex/compiler/internal/projects/FlexProject.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/projects/FlexProject.java b/compiler/src/org/apache/flex/compiler/internal/projects/FlexProject.java
index c187ed3..f12f47a 100644
--- a/compiler/src/org/apache/flex/compiler/internal/projects/FlexProject.java
+++ b/compiler/src/org/apache/flex/compiler/internal/projects/FlexProject.java
@@ -45,6 +45,7 @@ import org.apache.flex.compiler.definitions.IDefinition;
 import org.apache.flex.compiler.definitions.IEffectDefinition;
 import org.apache.flex.compiler.definitions.IEventDefinition;
 import org.apache.flex.compiler.definitions.IGetterDefinition;
+import org.apache.flex.compiler.definitions.ISetterDefinition;
 import org.apache.flex.compiler.definitions.IStyleDefinition;
 import org.apache.flex.compiler.definitions.IVariableDefinition;
 import org.apache.flex.compiler.definitions.references.IResolvedQualifiersReference;
@@ -1277,6 +1278,8 @@ public class FlexProject extends ASProject implements IFlexProject
             IDefinitionSet definitionSet = classScope.getLocalDefinitionSetByName(propertyName);
             if (definitionSet != null)
             {
+                IDefinition winner = null;
+                
                 int n = definitionSet.getSize();
                 for (int i = 0; i < n; i++)
                 {
@@ -1291,9 +1294,15 @@ public class FlexProject extends ASProject implements IFlexProject
                         // Can MXML set protected properties?
                         // Can MXML set mx_internal properties if you've done
                         // 'use namesapce mx_internal' in a <Script>?
-                        return definition;
+                        winner = definition;
+                        // if we find a setter always take it, otherwise 
+                        // keep looking for a setter
+                        if (winner instanceof ISetterDefinition)
+                            break;
                     }
                 }
+                if (winner != null)
+                    return winner;
             }
         }
     


Mime
View raw message