flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Harui (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-35116) private setter not accessible from class using this
Date Tue, 15 Nov 2016 21:05:58 GMT

    [ https://issues.apache.org/jira/browse/FLEX-35116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15668313#comment-15668313
] 

Alex Harui commented on FLEX-35116:
-----------------------------------

Current plan is to have Falcon report an error just like MXMLC unless you use the private::
namespace as Josh indicated.
FalconJX will allow either syntax.  FalconJX does not run semantic checks like this.  Both
Falcon and FalconJX share the syntax error reporting in building up the AST, but only Falcon
does semantic checks in reducing the AST to ABC.  FalconJX does not use the semantic checks
in the AST walk.

> private setter not accessible from class using this
> ---------------------------------------------------
>
>                 Key: FLEX-35116
>                 URL: https://issues.apache.org/jira/browse/FLEX-35116
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: FalconJX
>    Affects Versions: Apache FalconJX 0.6.0
>            Reporter: Yishay Weiss
>
> try this (see class A below)
> var a:A = new A();
> a.test()
> Expected result: No run time error
> Actual result: 
> ReferenceError: Error #1074: Illegal write to read-only property hello on A.
> package
> {
>     public class A
>     {
>         private var _hello:String;
>         public function A()
>         {
>         }
>         
>         public function get hello():String
>         {
>             return _hello;
>         }
>         private function set hello(value:String):void
>         {
>             _hello = value;
>             // do something
>         }
>         public function test():void
>         {
>             this.hello = "bye";
>         }
>     }
> }
> ----
> BTW, changing test() to do hello = "bye" works fine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message