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 <[email protected]> Authored: Thu Oct 16 22:44:14 2014 -0700 Committer: Alex Harui <[email protected]> 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:
