JSRoyaleDocEmitter, ClosureUtils: non-static public methods are now exported dynamically in release builds instead of requiring a doc comment
Previously, only static public methods were exported, so now both static and non-static are included
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
index f65833e..e3c584d 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
@@ -147,8 +147,16 @@
emitExports = !suppressExports;
exportProtected = false;
}
- emitExports = emitExports && !node.hasModifier(ASModifier.STATIC) && !node.getFunctionClassification().equals(FunctionClassification.PACKAGE_MEMBER);
- exportProtected = exportProtected && !node.hasModifier(ASModifier.STATIC);
+ if (node.getAncestorOfType(IClassNode.class) != null)
+ {
+ // export custom namespaces (for now), but not public on a class
+ emitExports = emitExports && !IASKeywordConstants.PUBLIC.equals(node.getNamespace());
+ }
+ else
+ {
+ // don't export public methods on an interface or a package-level function
+ emitExports = false;
+ }
coercionList = null;
ignoreList = null;
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java
index dd90ffa..9d6e81f 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java
@@ -190,9 +190,8 @@
|| nsRef instanceof INamespaceDefinition.IStaticProtectedNamespaceDefinition;
if (localDef instanceof IFunctionDefinition
&& !(localDef instanceof IAccessorDefinition)
- // the next two conditions are temporary
- // and more symbols will be exported in the future
- && localDef.isStatic()
+ // the next condition is temporary, and more
+ // symbols will be exported in the future
&& isPublic)
{
if ((isPublic && exportPublic) || (isProtected && exportProtected))
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
index 3dce316..002997f 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
@@ -46,7 +46,7 @@
"public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @export\n */\nRoyaleTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
"RoyaleTest_A.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"RoyaleTest_A.prototype.set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @export\n * @type {string} */\n" +
@@ -61,7 +61,7 @@
"public class B { public function B() {}; public function doStuff():void {this.label = label + 'bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n this.label = this.label + 'bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n this.label = this.label + 'bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
"B.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"B.prototype.set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @export\n * @type {string} */\nlabel: {\n" +
@@ -76,7 +76,7 @@
"public function doStuff():void {label = label + 'bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @export\n */\nRoyaleTest_A.prototype.doStuff = function() {\n this.label = this.label + 'bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n this.label = this.label + 'bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
"RoyaleTest_A.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"RoyaleTest_A.prototype.set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @export\n * @type {string} */\nlabel: {\n" +
@@ -91,7 +91,7 @@
"public class B { public function B() {}; public function doStuff():void {label = this.label; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n this.label = this.label;\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n this.label = this.label;\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
"B.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"B.prototype.set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @export\n * @type {string} */\nlabel: {\n" +
@@ -106,7 +106,7 @@
"import custom.custom_namespace;use namespace custom_namespace;public class B { public function B() {}; public function doStuff():void {var theLabel:String = label; label = theLabel;}; private var _label:String; custom_namespace function get label():String {return _label}; custom_namespace function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n var /** @type {string} */ theLabel = this.http_$$ns_apache_org$2017$custom$namespace__label;\n this.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n var /** @type {string} */ theLabel = this.http_$$ns_apache_org$2017$custom$namespace__label;\n this.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
"B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n return this._label;\n};\n\n\n" +
"B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @export\n * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
@@ -120,7 +120,7 @@
"import custom.custom_namespace;use namespace custom_namespace;public class B { public function B() {}; public function doStuff():void {var theLabel:String = this.label; this.label = theLabel;}; private var _label:String; custom_namespace function get label():String {return _label}; custom_namespace function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n var /** @type {string} */ theLabel = this.http_$$ns_apache_org$2017$custom$namespace__label;\n this.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n var /** @type {string} */ theLabel = this.http_$$ns_apache_org$2017$custom$namespace__label;\n this.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
"B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n return this._label;\n};\n\n\n" +
"B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @export\n * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
@@ -134,7 +134,7 @@
"import custom.custom_namespace;use namespace custom_namespace;public class B { public function B() {}; public function doStuff():void {var theLabel:String = label; label = theLabel;}; private static var _label:String; custom_namespace static function get label():String {return _label}; custom_namespace static function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n var /** @type {string} */ theLabel = B.http_$$ns_apache_org$2017$custom$namespace__label;\n B.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB._label = null;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n var /** @type {string} */ theLabel = B.http_$$ns_apache_org$2017$custom$namespace__label;\n B.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB._label = null;\n\n\n" +
"B.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n return B._label;\n};\n\n\n" +
"B.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n B._label = value;\n};\n\n\n" +
"Object.defineProperties(B, /** @lends {B} */ {\n/**\n * @export\n * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
@@ -148,7 +148,7 @@
"import custom.custom_namespace;use namespace custom_namespace;public class B { public function B() {}; public function doStuff():void {var theLabel:String = B.label; B.label = theLabel;}; private static var _label:String; custom_namespace static function get label():String {return _label}; custom_namespace static function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\n */\nB.prototype.doStuff = function() {\n var /** @type {string} */ theLabel = B.http_$$ns_apache_org$2017$custom$namespace__label;\n B.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB._label = null;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n var /** @type {string} */ theLabel = B.http_$$ns_apache_org$2017$custom$namespace__label;\n B.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB._label = null;\n\n\n" +
"B.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n return B._label;\n};\n\n\n" +
"B.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n B._label = value;\n};\n\n\n" +
"Object.defineProperties(B, /** @lends {B} */ {\n/**\n * @export\n * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
@@ -162,7 +162,7 @@
"public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; [Bindable] public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- String expected ="/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @export\n */\nRoyaleTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
+ String expected ="/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
"RoyaleTest_A.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"RoyaleTest_A.prototype.bindable__set__label_RoyaleTest_A = function(value) {\n" +
" this._label = value;" +
@@ -191,7 +191,7 @@
"public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; [Bindable(\"change\")] public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @export\n */\nRoyaleTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
+ String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n this.label = 'hello, bye';\n var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
"RoyaleTest_A.prototype.get__label = function() {\n return this._label;\n};\n\n\n" +
"RoyaleTest_A.prototype.set__label = function(value) {\n this._label = value;\n};\n\n\n" +
"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @export\n * @type {string} */\n" +
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
index cf750eb..1a0b517 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
@@ -135,7 +135,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public var event:Event = new Event(); public function foo():String {return event.type;};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n\nthis.event = new Event();\n};\n\n\n/**\n * @export\n * @type {Event}\n */\norg.apache.royale.B.prototype.event = null;\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.royale.B.prototype.foo = function() {\n return this.event.type;\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n\nthis.event = new Event();\n};\n\n\n/**\n * @export\n * @type {Event}\n */\norg.apache.royale.B.prototype.event = null;\n\n\n/**\n * @return {string}\n */\norg.apache.royale.B.prototype.foo = function() {\n return this.event.type;\n};";
assertOut(expected);
}
@@ -144,7 +144,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():void {};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n */\norg.apache.royale.B.prototype.foo = function() {\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n */\norg.apache.royale.B.prototype.foo = function() {\n};";
assertOut(expected);
}
@@ -153,7 +153,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():int { var a:int = 123; return a; };}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {number} */ a = 123;\n return a;\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {number} */ a = 123;\n return a;\n};";
assertOut(expected);
}
@@ -162,7 +162,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():int { var a:Number = 123.4; return a; };}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {number} */ a = 123.4;\n return (a) >> 0;\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {number} */ a = 123.4;\n return (a) >> 0;\n};";
assertOut(expected);
}
@@ -171,7 +171,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():int { return 123.4 };}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n return 123;\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n return 123;\n};";
assertOut(expected);
}
@@ -180,7 +180,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():uint { var a:uint = 123; return a; };}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {number} */ a = 123;\n return a;\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {number} */ a = 123;\n return a;\n};";
assertOut(expected);
}
@@ -189,7 +189,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():uint { var a:Number = 123.4; return a; };}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {number} */ a = 123.4;\n return (a) >>> 0;\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {number} */ a = 123.4;\n return (a) >>> 0;\n};";
assertOut(expected);
}
@@ -198,7 +198,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():uint { return 123.4 };}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n return 123;\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {number}\n */\norg.apache.royale.B.prototype.foo = function() {\n return 123;\n};";
assertOut(expected);
}
@@ -207,7 +207,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():Boolean { var a:Boolean = true; return a; };}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {boolean} */ a = true;\n return a;\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {boolean} */ a = true;\n return a;\n};";
assertOut(expected);
}
@@ -216,7 +216,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():Boolean { var a:Number = 123.4; return a; };}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {number} */ a = 123.4;\n return !!(a);\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n var /** @type {number} */ a = 123.4;\n return !!(a);\n};";
assertOut(expected);
}
@@ -225,7 +225,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():Boolean { return 123.4 };}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n return true;\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {boolean}\n */\norg.apache.royale.B.prototype.foo = function() {\n return true;\n};";
assertOut(expected);
}
@@ -234,7 +234,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.royale.B.prototype.foo = function() {\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @override\n */\norg.apache.royale.B.prototype.foo = function() {\n};";
assertOut(expected);
}
@@ -243,7 +243,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo(value:Object):void {baz = ''};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.royale.B.prototype.foo = function(value) {\n baz = '';\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @override\n */\norg.apache.royale.B.prototype.foo = function(value) {\n baz = '';\n};";
assertOut(expected);
}
@@ -252,7 +252,7 @@
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {super.foo();};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.royale.B.prototype.foo = function() {\n org.apache.royale.B.superClass_.foo.apply(this);\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @override\n */\norg.apache.royale.B.prototype.foo = function() {\n org.apache.royale.B.superClass_.foo.apply(this);\n};";
assertOut(expected);
}
@@ -707,7 +707,7 @@
+ "public static function foo7(value:Object):void{}"
+ "custom_namespace static function foo7(value:Object):void{}" + "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.royale.A.prototype.foo1 = function() {\n return null;\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.royale.A.prototype.foo1a = function() {\n return null;\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.royale.A.prototype.foo1b = function() {\n return org.apache.royale.A.superClass_.foo1b.apply(this);\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @package\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo6 = function(value) {\n};\n\n\n/**\n * @nocollapse\n * @param {Object} value\n */\norg.apache.royale.A.foo7 = function(value) {\n};\n\n\n/**\n * @nocollapse\n * @param {Object} value\n */\norg.apache.royale.A.http_$$ns_apache_org$2017$custom$namespace__foo7 = function(value) {\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.royale.A = function() {\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.royale.A.prototype.foo1 = function() {\n return null;\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.royale.A.prototype.foo1a = function() {\n return null;\n};\n\n\n/**\n * @override\n */\norg.apache.royale.A.prototype.foo1b = function() {\n return org.apache.royale.A.superClass_.foo1b.apply(this);\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @package\n * @param {Object} value\n */\norg.apache.royale.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__foo6 = function(value) {\n};\n\n\n/**\n * @nocollapse\n * @param {Object} value\n */\norg.apache.royale.A.foo7 = function(value) {\n};\n\n\n/**\n * @export\n * @nocollapse\n * @param {Object} value\n */\norg.apache.royale.A.http_$$ns_apache_org$2017$custom$namespace__foo7 = function(value) {\n};");
}
@Test
@@ -718,7 +718,7 @@
+ "public function foo2():Object{function bar2(param1:Object):Object {return null;}; return bar2('foo');}"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.royale.B.prototype.foo1 = function() {\n var self = this;\n function bar1() {\n return null;\n };\n return bar1();\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.royale.B.prototype.foo2 = function() {\n var self = this;\n function bar2(param1) {\n return null;\n };\n return bar2('foo');\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.royale.B.prototype.foo1 = function() {\n var self = this;\n function bar1() {\n return null;\n };\n return bar1();\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.royale.B.prototype.foo2 = function() {\n var self = this;\n function bar2(param1) {\n return null;\n };\n return bar2('foo');\n};");
}
@Test
@@ -730,7 +730,7 @@
+ "public function foo2():String{function bar2(param1:String):String {return param1 + baz1;}; return bar2('foo');}"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @type {string}\n */\norg.apache.royale.B.prototype.baz1 = null;\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.royale.B.prototype.foo1 = function() {\n var self = this;\n function bar1() {\n return self.baz1;\n };\n return bar1();\n};\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.royale.B.prototype.foo2 = function() {\n var self = this;\n function bar2(param1) {\n return param1 + self.baz1;\n };\n return bar2('foo');\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @type {string}\n */\norg.apache.royale.B.prototype.baz1 = null;\n\n\n/**\n * @return {string}\n */\norg.apache.royale.B.prototype.foo1 = function() {\n var self = this;\n function bar1() {\n return self.baz1;\n };\n return bar1();\n};\n\n\n/**\n * @return {string}\n */\norg.apache.royale.B.prototype.foo2 = function() {\n var self = this;\n function bar2(param1) {\n return param1 + self.baz1;\n };\n return bar2('foo');\n};");
}
@Test
@@ -750,7 +750,7 @@
+ "public function clone():B { return new B() }"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @export\n * @return {org.apache.royale.B}\n */\norg.apache.royale.B.prototype.clone = function() {\n return new org.apache.royale.B();\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\n/**\n * @return {org.apache.royale.B}\n */\norg.apache.royale.B.prototype.clone = function() {\n return new org.apache.royale.B();\n};");
}
@Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleEmitter.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleEmitter.java
index e8aeae6..e13125d 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleEmitter.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleEmitter.java
@@ -100,7 +100,6 @@
"\n" +
"\n" +
"/**\n" +
- " * @export\n" +
" * @param {string} value\n" +
" * @return {string}\n" +
" */\n" +
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
index 8d35553..57fa528 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
@@ -116,7 +116,6 @@
"RoyaleTest_A = function() {\n" +
"};\n\n\n" +
"/**\n" +
- " * @export\n" +
" * @override\n" +
" */\n" +
"RoyaleTest_A.prototype.isDefaultPrevented = function() {\n" +
@@ -169,7 +168,7 @@
IClassDefinition def = classnode.getDefinition();
((JSRoyaleEmitter)asEmitter).getModel().setCurrentClass(def);
asBlockWalker.visitFunction(fnode);
- assertOut("/**\n * @export\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(RoyaleTest_A.superClass_.foo, this, 'foo');\n}");
+ assertOut("/**\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(RoyaleTest_A.superClass_.foo, this, 'foo');\n}");
}
@Test
@@ -184,7 +183,7 @@
IClassDefinition def = classnode.getDefinition();
((JSRoyaleEmitter)asEmitter).getModel().setCurrentClass(def);
asBlockWalker.visitFunction(fnode);
- assertOut("/**\n * @export\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n var /** @type {Function} */ f = null;\n f = org.apache.royale.utils.Language.closure(RoyaleTest_A.superClass_.foo, this, 'foo');\n}");
+ assertOut("/**\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n var /** @type {Function} */ f = null;\n f = org.apache.royale.utils.Language.closure(RoyaleTest_A.superClass_.foo, this, 'foo');\n}");
}
@Test
@@ -199,7 +198,7 @@
IClassDefinition def = classnode.getDefinition();
((JSRoyaleEmitter)asEmitter).getModel().setCurrentClass(def);
asBlockWalker.visitFunction(fnode);
- assertOut("/**\n * @export\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n RoyaleTest_A.superClass_.foo.apply(this, [a, b, c]);\n}");
+ assertOut("/**\n * @override\n */\nRoyaleTest_A.prototype.foo = function() {\n RoyaleTest_A.superClass_.foo.apply(this, [a, b, c]);\n}");
}
//----------------------------------
@@ -471,7 +470,7 @@
// the asdoc so the emitter will suppress the output
docEmitter.emitMethodDoc(methodNode, asBlockWalker.getProject());
asBlockWalker.visitBinaryOperator(node);
- assertOut("/**\n * @royalenoimplicitstringconversion\n * @export\n */\nthis.b = this.c");
+ assertOut("/**\n * @royalenoimplicitstringconversion\n */\nthis.b = this.c");
}
@Test
@@ -1083,7 +1082,7 @@
"public class B {public function b() { function c(f:Function):void {}; function d():void {}; c(d); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n function d() {\n };\n c(d);\n}");
+ assertOut("/**\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n function d() {\n };\n c(d);\n}");
}
@Test
@@ -1093,7 +1092,7 @@
"public class B {public function b() { function c(s:String, f:Function):void {}; function d():void {}; c('foo', d); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n var self = this;\n function c(s, f) {\n };\n function d() {\n };\n c('foo', d);\n}");
+ assertOut("/**\n */\nB.prototype.b = function() {\n var self = this;\n function c(s, f) {\n };\n function d() {\n };\n c('foo', d);\n}");
}
@Test
@@ -1103,7 +1102,7 @@
"public class B {public function b() { c('foo', d); function c(s:String, f:Function):void {}; function d():void {};}}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n var self = this;\n function c(s, f) {\n };\n function d() {\n };\n c('foo', d);\n \n}");
+ assertOut("/**\n */\nB.prototype.b = function() {\n var self = this;\n function c(s, f) {\n };\n function d() {\n };\n c('foo', d);\n \n}");
}
@Test
@@ -1113,7 +1112,7 @@
"public class B {public function b() { function d():void {}; c('foo', d); } public function c(s:String, f:Function):void {};}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n var self = this;\n function d() {\n };\n this.c('foo', d);\n}");
+ assertOut("/**\n */\nB.prototype.b = function() {\n var self = this;\n function d() {\n };\n this.c('foo', d);\n}");
}
@Test
@@ -1123,7 +1122,7 @@
"public class B {public function b(ff:Function) { function c(f:Function):void {}; c(ff); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n * @param {Function} ff\n */\nB.prototype.b = function(ff) {\n var self = this;\n function c(f) {\n };\n c(ff);\n}");
+ assertOut("/**\n * @param {Function} ff\n */\nB.prototype.b = function(ff) {\n var self = this;\n function c(f) {\n };\n c(ff);\n}");
}
@Test
@@ -1143,7 +1142,7 @@
"public class B {public function b() { function c(f:Function):void {}; c(b); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n c(org.apache.royale.utils.Language.closure(this.b, this, 'b'));\n}");
+ assertOut("/**\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n c(org.apache.royale.utils.Language.closure(this.b, this, 'b'));\n}");
}
@Test
@@ -1163,7 +1162,7 @@
"public class B {public function b() { function c(f:Function):void {}; var f:Function = b; c(f); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(this.b, this, 'b');\n c(f);\n}");
+ assertOut("/**\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n var /** @type {Function} */ f = org.apache.royale.utils.Language.closure(this.b, this, 'b');\n c(f);\n}");
}
@Test
@@ -1243,7 +1242,7 @@
"public class B {public function b() { function c(f:Function):void {}; var f:Function = null; f = b; c(f); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n var /** @type {Function} */ f = null;\n f = org.apache.royale.utils.Language.closure(this.b, this, 'b');\n c(f);\n}");
+ assertOut("/**\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n var /** @type {Function} */ f = null;\n f = org.apache.royale.utils.Language.closure(this.b, this, 'b');\n c(f);\n}");
}
@Test
@@ -1263,7 +1262,7 @@
"public class B {public function b() { function c(f:Function):void {}; var f:Array = [b]; c(f[0]); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n var /** @type {Array} */ f = [org.apache.royale.utils.Language.closure(this.b, this, 'b')];\n c(/* implicit cast */ org.apache.royale.utils.Language.as(f[0], Function, true));\n}");
+ assertOut("/**\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n var /** @type {Array} */ f = [org.apache.royale.utils.Language.closure(this.b, this, 'b')];\n c(/* implicit cast */ org.apache.royale.utils.Language.as(f[0], Function, true));\n}");
}
@Test
@@ -1283,7 +1282,7 @@
"public class B {public function b() { function c(f:Function):void {}; c(this.b); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n c(org.apache.royale.utils.Language.closure(this.b, this, 'b'));\n}");
+ assertOut("/**\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n };\n c(org.apache.royale.utils.Language.closure(this.b, this, 'b'));\n}");
}
@Test
@@ -1293,7 +1292,7 @@
"public class B {public function b() { function c(f:Function):void {c(d); }; } public function d() {}}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n c(org.apache.royale.utils.Language.closure(self.d, self, 'd'));\n };\n \n}");
+ assertOut("/**\n */\nB.prototype.b = function() {\n var self = this;\n function c(f) {\n c(org.apache.royale.utils.Language.closure(self.d, self, 'd'));\n };\n \n}");
}
@Test
@@ -1304,7 +1303,7 @@
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
// String.length is a getter but is a property in JS, so don't generate set_length() call.
- assertOut("/**\n * @export\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {string} */ s = null;\n return s.length;\n}");
+ assertOut("/**\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {string} */ s = null;\n return s.length;\n}");
}
@Test
@@ -1315,7 +1314,7 @@
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
// String.length is a getter but is a property in JS, so don't generate set_length() call.
- assertOut("/**\n * @export\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {Array.<string>} */ a = null;\n return a.length;\n}");
+ assertOut("/**\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {Array.<string>} */ a = null;\n return a.length;\n}");
}
@Test
@@ -1325,7 +1324,7 @@
"public class B { public function a():void { b(c); } public function set b(v:Function):void {} public function get b():Function { return null; } public function get c():Object { return null; } public function set c(v:Object):void {} }",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nB.prototype.a = function() {\n this.b(this.c);\n}");
+ assertOut("/**\n */\nB.prototype.a = function() {\n this.b(this.c);\n}");
}
//----------------------------------
@@ -1363,7 +1362,7 @@
"import goog.bind; public class B {public function b() { goog.bind(b, this); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n goog.bind(org.apache.royale.utils.Language.closure(this.b, this, 'b'), this);\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n goog.bind(org.apache.royale.utils.Language.closure(this.b, this, 'b'), this);\n}");
}
@Test
@@ -1394,7 +1393,7 @@
"import custom.TestGlobalFunction; public class B {public function b() { TestGlobalFunction.length; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n custom.TestGlobalFunction.length;\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n custom.TestGlobalFunction.length;\n}");
}
@Test
@@ -1519,7 +1518,7 @@
"});}",
IFunctionNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\n" +
+ assertOut("/**\n */\n" +
"RoyaleTest_A.prototype.foo = function() {\n" +
" var self = this;\n" +
" function isEven(element, index, arr) {\n return element % 2 == 0;\n };\n var /** @type {Array} */ a = [];\n"
@@ -1533,7 +1532,7 @@
"public var bar:String = baz; public function foo():void { function localFunction():void { trace(bar); } localFunction() }",
IFunctionNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\n" +
+ assertOut("/**\n */\n" +
"RoyaleTest_A.prototype.foo = function() {\n" +
" var self = this;\n" +
" function localFunction() {\n org.apache.royale.utils.Language.trace(self.bar);\n };\n" +
@@ -1547,7 +1546,7 @@
"internal var bar:String = baz; public function foo():void { trace(bar); }",
IFunctionNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\n" +
+ assertOut("/**\n */\n" +
"RoyaleTest_A.prototype.foo = function() {\n" +
" org.apache.royale.utils.Language.trace(this.bar);\n}");
}
@@ -1568,7 +1567,7 @@
"public class B {public function b(o:Object):int { var a:B = null; a = o as B; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = org.apache.royale.utils.Language.as(o, foo.bar.B);\n}");
+ assertOut("/**\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = org.apache.royale.utils.Language.as(o, foo.bar.B);\n}");
}
@Test
@@ -1594,7 +1593,7 @@
"public class B {private var memberVar:Class; public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = /* implicit cast */ org.apache.royale.utils.Language.as(org.apache.royale.utils.Language.as(o, this.memberVar), foo.bar.B, true);\n}");
+ assertOut("/**\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = /* implicit cast */ org.apache.royale.utils.Language.as(org.apache.royale.utils.Language.as(o, this.memberVar), foo.bar.B, true);\n}");
}
@Test
@@ -1604,7 +1603,7 @@
"public class B {private var memberVar:Class; /**\n * @royalesuppresscompleximplicitcoercion\n */\n public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @royalesuppresscompleximplicitcoercion\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
+ assertOut("/**\n * @royalesuppresscompleximplicitcoercion\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
}
@Test
@@ -1614,7 +1613,7 @@
"public class B {private var memberVar:Class; /**\n * @royalesuppresscompleximplicitcoercion true\n */\n public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @royalesuppresscompleximplicitcoercion true\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
+ assertOut("/**\n * @royalesuppresscompleximplicitcoercion true\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
}
@Test
@@ -1624,7 +1623,7 @@
"public class B {private var memberVar:Class; /**\n * @royalesuppresscompleximplicitcoercion foo.bar.B\n */\n public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @royalesuppresscompleximplicitcoercion foo.bar.B\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
+ assertOut("/**\n * @royalesuppresscompleximplicitcoercion foo.bar.B\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
}
@@ -1642,7 +1641,7 @@
"public class B {private var memberVar:Class; public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
+ assertOut("/**\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = org.apache.royale.utils.Language.as(o, this.memberVar);\n}");
}
@Test
@@ -1659,7 +1658,7 @@
"public class B {private var memberVar:Class; /**\n * @royalesuppresscompleximplicitcoercion false\n */\n public function b(o:Object):int { var a:B = null; a = o as memberVar; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @royalesuppresscompleximplicitcoercion false\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = /* implicit cast */ org.apache.royale.utils.Language.as(org.apache.royale.utils.Language.as(o, this.memberVar), foo.bar.B, true);\n}");
+ assertOut("/**\n * @royalesuppresscompleximplicitcoercion false\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a = null;\n a = /* implicit cast */ org.apache.royale.utils.Language.as(org.apache.royale.utils.Language.as(o, this.memberVar), foo.bar.B, true);\n}");
}
@Test
@@ -1669,7 +1668,7 @@
"public class LinkableString {public function b(o:Object):int { var a:LinkableString = null; a = o as LinkableString; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.LinkableString.prototype.b = function(o) {\n var /** @type {foo.bar.LinkableString} */ a = null;\n a = org.apache.royale.utils.Language.as(o, foo.bar.LinkableString);\n}");
+ assertOut("/**\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.LinkableString.prototype.b = function(o) {\n var /** @type {foo.bar.LinkableString} */ a = null;\n a = org.apache.royale.utils.Language.as(o, foo.bar.LinkableString);\n}");
}
@Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleFieldMembers.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleFieldMembers.java
index c715e9d..ecf5b36 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleFieldMembers.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleFieldMembers.java
@@ -210,7 +210,7 @@
IClassNode node = (IClassNode) getNode("import custom.custom_namespace;use namespace custom_namespace;public static var foo:Object = initFoo(); custom_namespace static function initFoo():Object { return null; }",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @export\n * @type {Object}\n */\nRoyaleTest_A.foo;\n\n\n/**\n * @return {Object}\n */\nRoyaleTest_A.http_$$ns_apache_org$2017$custom$namespace__initFoo = function() {\n return null;\n};\n\nRoyaleTest_A.foo = RoyaleTest_A.http_$$ns_apache_org$2017$custom$namespace__initFoo();\n\n");
+ assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n * @export\n * @type {Object}\n */\nRoyaleTest_A.foo;\n\n\n/**\n * @export\n * @return {Object}\n */\nRoyaleTest_A.http_$$ns_apache_org$2017$custom$namespace__initFoo = function() {\n return null;\n};\n\nRoyaleTest_A.foo = RoyaleTest_A.http_$$ns_apache_org$2017$custom$namespace__initFoo();\n\n");
}
@Test
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalClasses.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalClasses.java
index bae6cd4..6ef63d0 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalClasses.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleGlobalClasses.java
@@ -1465,7 +1465,7 @@
"import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();a.foo = 'bar'; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n a.setProperty('foo', 'bar');\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n a.setProperty('foo', 'bar');\n}");
}
@Test
@@ -1475,7 +1475,7 @@
"import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();a['foo'] = 'bar'; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n a.setProperty('foo', 'bar');\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n a.setProperty('foo', 'bar');\n}");
}
@Test
@@ -1485,7 +1485,7 @@
"import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();var foo:String;a[foo] = 'bar'; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {string} */ foo = null;\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n //var /** @type {string} */ foo = null;\n a.setProperty(foo, 'bar');\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {string} */ foo = null;\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n //var /** @type {string} */ foo = null;\n a.setProperty(foo, 'bar');\n}");
}
@Test
@@ -1495,7 +1495,7 @@
"import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();var foo:uint = 0;a[foo] = 'bar'; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n var /** @type {number} */ foo = 0;\n a.setProperty(foo, 'bar');\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n var /** @type {number} */ foo = 0;\n a.setProperty(foo, 'bar');\n}");
}
@Test
@@ -1505,7 +1505,7 @@
"import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();var bar:* = a.foo; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n var /** @type {*} */ bar = a.getProperty('foo');\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n var /** @type {*} */ bar = a.getProperty('foo');\n}");
}
@Test
@@ -1515,7 +1515,7 @@
"import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy(); if (a[0] != null) return; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n if (a.getProperty(0) != null)\n return;\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n if (a.getProperty(0) != null)\n return;\n}");
}
@Test
@@ -1525,7 +1525,7 @@
"import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();var bar:* = a.foo(10,\"ten\"); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n var /** @type {*} */ bar = a.callProperty('foo', 10, \"ten\");\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n var /** @type {*} */ bar = a.callProperty('foo', 10, \"ten\");\n}");
}
@Test
@@ -1535,7 +1535,7 @@
"import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();var baz:String = a.foo + 'bar'; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n var /** @type {string} */ baz = a.getProperty('foo') + 'bar';\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n var /** @type {string} */ baz = a.getProperty('foo') + 'bar';\n}");
}
@Test
@@ -1545,7 +1545,7 @@
"import custom.TestProxy; public class B {public function b() { var a:TestProxy = new TestProxy();a.foo += 'bar'; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n a.setProperty('foo', a.getProperty('foo') + 'bar');\n}");
+ assertOut("/**\n */\nfoo.bar.B.prototype.b = function() {\n var /** @type {custom.TestProxy} */ a = new custom.TestProxy();\n a.setProperty('foo', a.getProperty('foo') + 'bar');\n}");
}
@Test
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleInterface.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleInterface.java
index ce6b83b..3cadf61 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleInterface.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleInterface.java
@@ -90,7 +90,7 @@
+ "function baz1():Object;"
+ "function baz2(value:Object):void;}");
asBlockWalker.visitInterface(node);
- assertOut("/**\n * @interface\n */\nIA = function() {\n};\n/**\n * @export\n * @return {Object}\n */\nIA.prototype.baz1 = function() {\n};\n/**\n * @export\n * @param {Object} value\n */\nIA.prototype.baz2 = function(value) {\n};");
+ assertOut("/**\n * @interface\n */\nIA = function() {\n};\n/**\n * @return {Object}\n */\nIA.prototype.baz1 = function() {\n};\n/**\n * @param {Object} value\n */\nIA.prototype.baz2 = function(value) {\n};");
}
@Override
@@ -103,7 +103,7 @@
+ "function baz1():Object;"
+ "function baz2(value:Object):void;}");
asBlockWalker.visitInterface(node);
- assertOut("/**\n * @interface\n */\nIA = function() {\n};\n/** * @type {Object}\n */IA.prototype.foo1;\n/**\n * @export\n * @return {Object}\n */\nIA.prototype.baz1 = function() {\n};\n/**\n * @export\n * @param {Object} value\n */\nIA.prototype.baz2 = function(value) {\n};");
+ assertOut("/**\n * @interface\n */\nIA = function() {\n};\n/** * @type {Object}\n */IA.prototype.foo1;\n/**\n * @return {Object}\n */\nIA.prototype.baz1 = function() {\n};\n/**\n * @param {Object} value\n */\nIA.prototype.baz2 = function(value) {\n};");
}
protected IBackend createBackend()
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleMethodMembers.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleMethodMembers.java
index 54a7263..e92b5a9 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleMethodMembers.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleMethodMembers.java
@@ -165,7 +165,7 @@
IFunctionNode node = getMethod("public function foo(bar:String, baz:int = null):int{ return -1;}");
asBlockWalker.visitFunction(node);
// we ignore the 'public' namespace completely
- assertOut("/**\n * @export\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
+ assertOut("/**\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
}
@Override
@@ -186,7 +186,7 @@
{
IFunctionNode node = getMethod("public override function foo(bar:String, baz:int = null):int{ return -1;}");
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n * @override\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
+ assertOut("/**\n * @override\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
}
@Override
@@ -195,7 +195,7 @@
{
IFunctionNode node = getMethod("override public function foo(bar:String, baz:int = null):int{return -1;}");
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n * @override\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
+ assertOut("/**\n * @override\n */\nRoyaleTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
}
@Test
@@ -203,7 +203,7 @@
{
IFunctionNode node = getMethod("public function foo():String{const A:String = 'Hello World'; return A;}");
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @export\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n \n/**\n * @const\n * @type {string}\n */\nvar A = 'Hello World';\n return A;\n}");
+ assertOut("/**\n * @return {string}\n */\nRoyaleTest_A.prototype.foo = function() {\n \n/**\n * @const\n * @type {string}\n */\nvar A = 'Hello World';\n return A;\n}");
}
@Test
@@ -211,7 +211,7 @@
{
IClassNode node = (IClassNode) getNode("public abstract class A { public abstract function a(arg1:String):Object; }", IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nA = function() {\n};\n\n\n/**\n * @export\n * @param {string} arg1\n * @return {Object}\n */\nA.prototype.a = function(arg1) {\n};");
+ assertOut("/**\n * @constructor\n */\nA = function() {\n};\n\n\n/**\n * @param {string} arg1\n * @return {Object}\n */\nA.prototype.a = function(arg1) {\n};");
}
@Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
index 9fdceab..7d61fc4 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
@@ -355,7 +355,6 @@
"\n" +
"\n" +
"/**\n" +
- " * @export\n" +
" */\n" +
"foo.bar.baz.A.prototype.foo = function() {\n" +
"};\n" +
@@ -731,7 +730,6 @@
"\n" +
"\n" +
"/**\n" +
- " * @export\n" +
" * @return {string}\n" +
" */\n" +
"foo.bar.baz.A.InternalClass.prototype.someMethod = function() {\n" +
@@ -1069,7 +1067,6 @@
"\n" +
"\n" +
"/**\n" +
- " * @export\n" +
" */\n" +
"foo.bar.baz.A.InternalClass.prototype.test = function() {\n" +
"};\n" +
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLApplication.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLApplication.java
index 25c46d3..e435712 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLApplication.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLApplication.java
@@ -1927,7 +1927,6 @@
"\n" +
"\n" +
"/**\n" +
- " * @export\n" +
" * @param {string} foo\n" +
" */\n" +
"AppName.prototype.fn_test = function(foo) {\n" +
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLScript.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLScript.java
index f0eee63..e42f4a1 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLScript.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/mxml/royale/TestRoyaleMXMLScript.java
@@ -82,7 +82,6 @@
"\n" +
"\n" +
"/**\n" +
- " * @export\n" +
" * @override\n" +
" */\n" +
"AppName.prototype.addedToParent = function() {\n" +
@@ -184,7 +183,6 @@
"\n" +
"\n" +
"/**\n" +
- " * @export\n" +
" */\n" +
"AppName.prototype.bar = function() {\n" +
"};\n" +
diff --git a/compiler-jx/src/test/resources/royale/files/LocalFunction_result.js b/compiler-jx/src/test/resources/royale/files/LocalFunction_result.js
index fb8e594..7a2df4b 100644
--- a/compiler-jx/src/test/resources/royale/files/LocalFunction_result.js
+++ b/compiler-jx/src/test/resources/royale/files/LocalFunction_result.js
@@ -51,7 +51,6 @@
/**
- * @export
*/
LocalFunction.prototype.doIt = function() {
this.myMemberMethod(624);
diff --git a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
index 11a752d..6716c67 100644
--- a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
+++ b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
@@ -222,7 +222,6 @@
/**
- * @export
*/
MyInitialView.prototype.startTimer = function() {
this.timer = new org.apache.royale.utils.Timer(1000);
@@ -232,7 +231,6 @@
/**
- * @export
* @param {org.apache.royale.events.Event} event
*/
MyInitialView.prototype.timerHandler = function(event) {
diff --git a/compiler-jx/src/test/resources/royale/files/controllers/MyController_result.js b/compiler-jx/src/test/resources/royale/files/controllers/MyController_result.js
index 4563cde..63783c3 100644
--- a/compiler-jx/src/test/resources/royale/files/controllers/MyController_result.js
+++ b/compiler-jx/src/test/resources/royale/files/controllers/MyController_result.js
@@ -137,7 +137,6 @@
/**
- * @export
* @param {Object} document
* @param {string=} id
*/
diff --git a/compiler-jx/src/test/resources/royale/projects/interfaces/Test_result.js b/compiler-jx/src/test/resources/royale/projects/interfaces/Test_result.js
index c2a999d..908da75 100644
--- a/compiler-jx/src/test/resources/royale/projects/interfaces/Test_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/interfaces/Test_result.js
@@ -43,7 +43,6 @@
/**
- * @export
* @param {interfaces.IC} ic
* @return {interfaces.IC}
*/
diff --git a/compiler-jx/src/test/resources/royale/projects/overrides/Test_result.js b/compiler-jx/src/test/resources/royale/projects/overrides/Test_result.js
index 23a1310..f150314 100644
--- a/compiler-jx/src/test/resources/royale/projects/overrides/Test_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/overrides/Test_result.js
@@ -38,7 +38,6 @@
/**
- * @export
* @override
*/
Test.prototype.someFunction = function() {
@@ -47,7 +46,6 @@
/**
- * @export
* @override
*/
Test.prototype.someOtherFunction = function() {
diff --git a/compiler-jx/src/test/resources/royale/projects/overrides/classes/A_result.js b/compiler-jx/src/test/resources/royale/projects/overrides/classes/A_result.js
index d44ac49..edcaeb3 100644
--- a/compiler-jx/src/test/resources/royale/projects/overrides/classes/A_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/overrides/classes/A_result.js
@@ -36,7 +36,6 @@
/**
- * @export
* @return {classes.B}
*/
classes.A.prototype.someFunction = function() {
@@ -45,7 +44,6 @@
/**
- * @export
* @return {interfaces.IB}
*/
classes.A.prototype.someOtherFunction = function() {
diff --git a/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IA_result.js b/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IA_result.js
index 688908e..f14ec2f 100644
--- a/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IA_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/overrides/interfaces/IA_result.js
@@ -32,13 +32,11 @@
interfaces.IA = function() {
};
/**
- * @export
* @return {classes.B}
*/
interfaces.IA.prototype.someFunction = function() {
};
/**
- * @export
* @return {interfaces.IB}
*/
interfaces.IA.prototype.someOtherFunction = function() {