flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Tynjala (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-35334) @externs with ActionScript classes works correctly, but incorrect output on an interface
Date Wed, 05 Jul 2017 22:32:00 GMT

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

Josh Tynjala commented on FLEX-35334:
-------------------------------------

In PackageHeaderEmitter.java, it checks if the ITypeNode is a ClassNode

{code}
ITypeNode typeNode = type.getNode();
if (typeNode instanceof ClassNode)
{
{code}

I think an InterfaceNode should also be acceptable here.

As a general note, an interface like IClassNode or IInterfaceNode is probably a better than
ClassNode or InterfaceNode, assuming that the interfaces expose the required APIs. Of course,
the original ITypeNode might be even better, assuming that classes and interfaces are the
only types.

> @externs with ActionScript classes works correctly, but incorrect output on an interface
> ----------------------------------------------------------------------------------------
>
>                 Key: FLEX-35334
>                 URL: https://issues.apache.org/jira/browse/FLEX-35334
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: FalconJX
>    Affects Versions: Apache FalconJX 0.8.0
>            Reporter: Josh Tynjala
>
> Compiling the following class with compc will correctly produce externs/ClassExterns.js
in the output SWC with a proper @externs tag in the first jsdoc comment:
> {code}
> package
> {
> 	/**
> 	 * @externs
> 	 */
> 	public class ClassExterns
> 	{
> 		public var variable:String;
> 		public function get prop():String {return null};
> 		public function set prop(value:String):void {};
> 		public function method():Number {return 0};
> 	}
> }
> {code}
> However, the following interface produces js/out/InterfaceExterns.js (wrong directory)
and the @externs tag is missing in the first jsdoc comment:
> {code}
> package
> {
> 	/**
> 	 * @externs
> 	 */
> 	public interface InterfaceExterns
> 	{
> 		function get prop():String;
> 		function set prop(value:String):void;
> 		function method():Number;
> 	}
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message