You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/10/17 07:45:32 UTC

[2/3] git commit: [flex-falcon] [refs/heads/develop] - catch more cases of reading from write-only properties. The one case was IEventDispatcher(strand).addEventListener where strand is write-only. The BURM doesn't see strand.addEventListener as a simp

catch more cases of reading from write-only properties.  The one case was IEventDispatcher(strand).addEventListener where strand is write-only.  The BURM doesn't see strand.addEventListener as a simple member access expression so the checks for write-only were bypassed.


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

Branch: refs/heads/develop
Commit: cfb9242c63a99e7fbdeb6dcc782db8101b289c6c
Parents: 28a3bad
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 16 22:44:14 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 16 22:44:14 2014 -0700

----------------------------------------------------------------------
 .../internal/semantics/MethodBodySemanticChecker.java        | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/cfb9242c/compiler/src/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java b/compiler/src/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
index 6a96d09..ba31e09 100644
--- a/compiler/src/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
+++ b/compiler/src/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
@@ -1526,6 +1526,14 @@ public class MethodBodySemanticChecker
         Name name = binding.getName();
         assert name != null;
 
+        if ( utils.isWriteOnlyDefinition(binding.getDefinition()) )
+        {
+            addProblem(new PropertyIsWriteOnlyProblem(
+                binding.getNode(),
+                name.getBaseName()
+            ));
+        }
+        
         switch ( name.getKind() )
         {
             case ABCConstants.CONSTANT_QnameA: