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] [Resolved] (FLEX-34992) Missing FLEXJS_CLASS_INFO in class internal to a file
Date Wed, 23 Dec 2015 15:54:46 GMT

     [ https://issues.apache.org/jira/browse/FLEX-34992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alex Harui resolved FLEX-34992.
-------------------------------
       Resolution: Fixed
         Assignee: Alex Harui
    Fix Version/s: Apache FalconJX 0.6.0

85d6606b41ed460ffaf22e208372b65dfb0242fb

The FLEXJS_CLASS_INFO seemed to be already there, but internal interface output wasn't correct

> Missing FLEXJS_CLASS_INFO in class internal to a file
> -----------------------------------------------------
>
>                 Key: FLEX-34992
>                 URL: https://issues.apache.org/jira/browse/FLEX-34992
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Falcon, FlexJS
>    Affects Versions: Apache FlexJS 0.5.0
>            Reporter: Andy Dufilie
>            Assignee: Alex Harui
>            Priority: Minor
>             Fix For: Apache FalconJX 0.6.0
>
>
> In the example below, notice that the InternalClass output does not include FLEXJS_CLASS_INFO,
so the "as" operator in testFunction() will return null and iti.test() will crash.
> AS input:
> {code}
> package foo.bar {
> 	public class TestMissingFlexClassInfo {
> 		public function testFunction():void {
> 			var iti:ITestInterface = new InternalClass() as ITestInterface;
> 			iti.test();
> 		}
> 	}
> }
> import foo.bar.ITestInterface;
> internal class InternalClass implements ITestInterface {
> 	public function test():void { }
> }
> {code}
> JS output:
> {code}
> /**
>  * Generated by Apache Flex Cross-Compiler from foo\bar\TestMissingFlexClassInfo.as
>  * foo.bar.TestMissingFlexClassInfo
>  *
>  * @fileoverview
>  *
>  * @suppress {checkTypes}
>  */
> goog.provide('foo.bar.TestMissingFlexClassInfo');
> goog.require('foo.bar.ITestInterface');
> /**
>  * @constructor
>  */
> foo.bar.TestMissingFlexClassInfo = function() {
> };
> /**
>  * @export
>  */
> foo.bar.TestMissingFlexClassInfo.prototype.testFunction = function() {
>   var /** @type {foo.bar.ITestInterface} */ iti = org.apache.flex.utils.Language.as(new
InternalClass(), foo.bar.ITestInterface);
>   iti.test();
> };
> /**
>  * Metadata
>  *
>  * @type {Object.<string, Array.<Object>>}
>  */
> foo.bar.TestMissingFlexClassInfo.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestMissingFlexClassInfo',
qName: 'foo.bar.TestMissingFlexClassInfo'}] };
> /**
>  * @constructor
>  * @implements {foo.bar.ITestInterface}
>  */
> InternalClass = function() {
> };
> /**
>  * @export
>  */
> InternalClass.prototype.test = function() {
> };
> {code}



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

Mime
View raw message