You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/03/27 16:13:15 UTC
[01/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - Add env.env.PLAYERGLOBAL_VERSION to
env-template.properties
Repository: flex-falcon
Updated Branches:
refs/heads/feature/maven-migration a28717cc1 -> 0c1b60efa
Add env.env.PLAYERGLOBAL_VERSION to env-template.properties
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/8ea2b999
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/8ea2b999
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/8ea2b999
Branch: refs/heads/feature/maven-migration
Commit: 8ea2b9995443e3a20a7153d575c66c2152d39bbf
Parents: 00c0b41
Author: OmPrakash Muppirala <bi...@gmail.com>
Authored: Sat Mar 19 21:55:10 2016 -0700
Committer: OmPrakash Muppirala <bi...@gmail.com>
Committed: Sat Mar 19 21:55:49 2016 -0700
----------------------------------------------------------------------
env-template.properties | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8ea2b999/env-template.properties
----------------------------------------------------------------------
diff --git a/env-template.properties b/env-template.properties
index 5734980..9a1f083 100644
--- a/env-template.properties
+++ b/env-template.properties
@@ -104,3 +104,7 @@
#
#env.ASJS_HOME=
+#
+# If you use a player global that is different that the default of 11.0,
+# you need to set it here.
+#env.PLAYERGLOBAL_VERSION=21.0
\ No newline at end of file
[07/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - FLEX-35053 MXML implements attribute
Posted by cd...@apache.org.
FLEX-35053 MXML implements attribute
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/6541ded7
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/6541ded7
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/6541ded7
Branch: refs/heads/feature/maven-migration
Commit: 6541ded7d9e8c0f092b3766d6709c7c3518134f1
Parents: e736a12
Author: Alex Harui <ah...@apache.org>
Authored: Mon Mar 21 23:46:22 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Mar 21 23:46:22 2016 -0700
----------------------------------------------------------------------
.../mxml/flexjs/TestFlexJSMXMLApplication.java | 193 +++++++++++++++++++
.../compiler/internal/test/FlexJSTestBase.java | 1 +
.../codegen/mxml/flexjs/MXMLFlexJSEmitter.java | 38 +++-
3 files changed, 231 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/6541ded7/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
index a4dce65..474f496 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
@@ -18,10 +18,13 @@
*/
package org.apache.flex.compiler.internal.codegen.mxml.flexjs;
+import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter;
import org.apache.flex.compiler.internal.driver.js.goog.JSGoogConfiguration;
import org.apache.flex.compiler.internal.projects.FlexJSProject;
import org.apache.flex.compiler.internal.test.FlexJSTestBase;
+import org.apache.flex.compiler.tree.mxml.IMXMLDocumentNode;
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLScriptNode;
import org.junit.Test;
public class TestFlexJSMXMLApplication extends FlexJSTestBase
@@ -77,5 +80,195 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
assertOutWithMetadata(getCodeFromFile(fileName + "_result", true, "flexjs/files"));
}
+
+ @Test
+ public void testInterfaceAttribute()
+ {
+ String code = "<basic:Application xmlns:fx=\"http://ns.adobe.com/mxml/2009\" xmlns:basic=\"library://ns.apache.org/flexjs/basic\" implements=\"org.apache.flex.core.IChrome\">"
+ + "<fx:Script><![CDATA["
+ + " import org.apache.flex.core.IChrome;"
+ + "]]></fx:Script></basic:Application>";
+
+ IMXMLDocumentNode dnode = (IMXMLDocumentNode) getNode(code,
+ IMXMLDocumentNode.class, FlexJSTestBase.WRAP_LEVEL_NONE);
+
+ ((JSFlexJSEmitter)(mxmlBlockWalker.getASEmitter())).getModel().setCurrentClass(dnode.getDefinition());
+ mxmlBlockWalker.visitDocument(dnode);
+ String appName = dnode.getQualifiedName();
+ String outTemplate = "/**\n" +
+ " * AppName\n" +
+ " *\n" +
+ " * @fileoverview\n" +
+ " *\n" +
+ " * @suppress {checkTypes|accessControls}\n" +
+ " */\n" +
+ "\n" +
+ "goog.provide('AppName');\n" +
+ "\n" +
+ "goog.require('org.apache.flex.core.Application');\n" +
+ "goog.require('org.apache.flex.core.IChrome');\n" +
+ "\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * @constructor\n" +
+ " * @extends {org.apache.flex.core.Application}\n" +
+ " */\n" +
+ "AppName = function() {\n" +
+ " AppName.base(this, 'constructor');\n" +
+ " \n" +
+ " /**\n" +
+ " * @private\n" +
+ " * @type {Array}\n" +
+ " */\n" +
+ " this.mxmldd;\n" +
+ " \n" +
+ " /**\n" +
+ " * @private\n" +
+ " * @type {Array}\n" +
+ " */\n" +
+ " this.mxmldp;\n" +
+ "};\n" +
+ "goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Metadata\n" +
+ " *\n" +
+ " * @type {Object.<string, Array.<Object>>}\n" +
+ " */\n" +
+ "AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName' }], interfaces: [org.apache.flex.core.IChrome] };\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
+ "\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Reflection\n" +
+ " *\n" +
+ " * @return {Object.<string, Function>}\n" +
+ " */\n" +
+ "AppName.prototype.FLEXJS_REFLECTION_INFO = function () {\n" +
+ " return {\n" +
+ " variables: function () {\n" +
+ " return {\n" +
+ " };\n" +
+ " },\n" +
+ " accessors: function () {\n" +
+ " return {\n" +
+ " };\n" +
+ " },\n" +
+ " methods: function () {\n" +
+ " return {\n" +
+ " };\n" +
+ " }\n" +
+ " };\n" +
+ "};\n" +
+ "\n" +
+ "\n" +
+ "\n";
+
+ assertOutWithMetadata(outTemplate.replaceAll("AppName", appName));
+ }
+
+ @Test
+ public void testTwoInterfaceAttribute()
+ {
+ String code = "<basic:Application xmlns:fx=\"http://ns.adobe.com/mxml/2009\" xmlns:basic=\"library://ns.apache.org/flexjs/basic\" implements=\"org.apache.flex.core.IChrome, org.apache.flex.core.IPopUp\">"
+ + "<fx:Script><![CDATA["
+ + " import org.apache.flex.core.IPopUp;"
+ + " import org.apache.flex.core.IChrome;"
+ + "]]></fx:Script></basic:Application>";
+
+ IMXMLDocumentNode dnode = (IMXMLDocumentNode) getNode(code,
+ IMXMLDocumentNode.class, FlexJSTestBase.WRAP_LEVEL_NONE);
+
+ ((JSFlexJSEmitter)(mxmlBlockWalker.getASEmitter())).getModel().setCurrentClass(dnode.getDefinition());
+ mxmlBlockWalker.visitDocument(dnode);
+ String appName = dnode.getQualifiedName();
+ String outTemplate = "/**\n" +
+ " * AppName\n" +
+ " *\n" +
+ " * @fileoverview\n" +
+ " *\n" +
+ " * @suppress {checkTypes|accessControls}\n" +
+ " */\n" +
+ "\n" +
+ "goog.provide('AppName');\n" +
+ "\n" +
+ "goog.require('org.apache.flex.core.Application');\n" +
+ "goog.require('org.apache.flex.core.IChrome');\n" +
+ "goog.require('org.apache.flex.core.IPopUp');\n" +
+ "\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * @constructor\n" +
+ " * @extends {org.apache.flex.core.Application}\n" +
+ " */\n" +
+ "AppName = function() {\n" +
+ " AppName.base(this, 'constructor');\n" +
+ " \n" +
+ " /**\n" +
+ " * @private\n" +
+ " * @type {Array}\n" +
+ " */\n" +
+ " this.mxmldd;\n" +
+ " \n" +
+ " /**\n" +
+ " * @private\n" +
+ " * @type {Array}\n" +
+ " */\n" +
+ " this.mxmldp;\n" +
+ "};\n" +
+ "goog.inherits(AppName, org.apache.flex.core.Application);\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Metadata\n" +
+ " *\n" +
+ " * @type {Object.<string, Array.<Object>>}\n" +
+ " */\n" +
+ "AppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName' }], interfaces: [org.apache.flex.core.IChrome, org.apache.flex.core.IPopUp] };\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Prevent renaming of class. Needed for reflection.\n" +
+ " */\n" +
+ "goog.exportSymbol('AppName', AppName);\n" +
+ "\n" +
+ "\n" +
+ "\n" +
+ "/**\n" +
+ " * Reflection\n" +
+ " *\n" +
+ " * @return {Object.<string, Function>}\n" +
+ " */\n" +
+ "AppName.prototype.FLEXJS_REFLECTION_INFO = function () {\n" +
+ " return {\n" +
+ " variables: function () {\n" +
+ " return {\n" +
+ " };\n" +
+ " },\n" +
+ " accessors: function () {\n" +
+ " return {\n" +
+ " };\n" +
+ " },\n" +
+ " methods: function () {\n" +
+ " return {\n" +
+ " };\n" +
+ " }\n" +
+ " };\n" +
+ "};\n" +
+ "\n" +
+ "\n" +
+ "\n";
+
+ assertOutWithMetadata(outTemplate.replaceAll("AppName", appName));
+ }
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/6541ded7/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
index 0caa8a9..e1c5056 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
@@ -98,6 +98,7 @@ public class FlexJSTestBase extends TestBase
// Node "factory"
//--------------------------------------------------------------------------
+ public static final int WRAP_LEVEL_NONE = 0;
public static final int WRAP_LEVEL_DOCUMENT = 1;
protected IMXMLNode getNode(String code, Class<? extends IMXMLNode> type,
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/6541ded7/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index dd89f6b..a3dfac8 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -65,6 +65,7 @@ import org.apache.flex.compiler.tree.ASTNodeID;
import org.apache.flex.compiler.tree.as.IASNode;
import org.apache.flex.compiler.tree.as.IExpressionNode;
import org.apache.flex.compiler.tree.as.IFunctionNode;
+import org.apache.flex.compiler.tree.as.IIdentifierNode;
import org.apache.flex.compiler.tree.as.IImportNode;
import org.apache.flex.compiler.tree.as.IVariableNode;
import org.apache.flex.compiler.tree.metadata.IMetaTagNode;
@@ -78,6 +79,7 @@ import org.apache.flex.compiler.tree.mxml.IMXMLDeclarationsNode;
import org.apache.flex.compiler.tree.mxml.IMXMLDocumentNode;
import org.apache.flex.compiler.tree.mxml.IMXMLEventSpecifierNode;
import org.apache.flex.compiler.tree.mxml.IMXMLFactoryNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLImplementsNode;
import org.apache.flex.compiler.tree.mxml.IMXMLInstanceNode;
import org.apache.flex.compiler.tree.mxml.IMXMLLiteralNode;
import org.apache.flex.compiler.tree.mxml.IMXMLMetadataNode;
@@ -130,6 +132,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
private StringBuilder subDocuments = new StringBuilder();
private ArrayList<String> subDocumentNames = new ArrayList<String>();
+ private String interfaceList;
/**
* This keeps track of the entries in our temporary array of
@@ -497,7 +500,14 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
write(cdef.getBaseName());
write("', qName: '");
write(formatQualifiedName(cname));
- write("' }] };");
+ write("' }]");
+ if (interfaceList != null)
+ {
+ write(", interfaces: [");
+ write(interfaceList);
+ write("]");
+ }
+ write(" };");
writeNewline();
writeNewline();
@@ -2008,6 +2018,15 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
.getCompilationUnitForDefinition(cdef);
ArrayList<String> deps = project.getRequires(cu);
+ if (interfaceList != null)
+ {
+ String[] interfaces = interfaceList.split(", ");
+ for (String iface : interfaces)
+ {
+ deps.add(iface);
+ usedNames.add(iface);
+ }
+ }
if (deps != null)
{
Collections.sort(deps);
@@ -2213,4 +2232,21 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
}
}
}
+
+ @Override
+ public void emitImplements(IMXMLImplementsNode node)
+ {
+ StringBuilder list = new StringBuilder();
+ boolean needsComma = false;
+ IIdentifierNode[] interfaces = node.getInterfaceNodes();
+ for (IIdentifierNode iface : interfaces)
+ {
+ if (needsComma)
+ list.append(", ");
+ list.append(iface.getName());
+ needsComma = true;
+ }
+ interfaceList = list.toString();
+ }
+
}
[06/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - handle null
Posted by cd...@apache.org.
handle null
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/0d5b35f0
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/0d5b35f0
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/0d5b35f0
Branch: refs/heads/feature/maven-migration
Commit: 0d5b35f018da4c85b3e7361ae1686f53ff03ab6e
Parents: 0d4d871
Author: Alex Harui <ah...@apache.org>
Authored: Sun Mar 20 22:19:23 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Mar 21 21:01:45 2016 -0700
----------------------------------------------------------------------
.../org/apache/flex/compiler/internal/projects/FlexJSProject.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/0d5b35f0/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java b/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
index 67657f7..15cf7ab 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
@@ -266,7 +266,8 @@ public class FlexJSProject extends FlexProject
{
if (baseDefinition == overrideDefinition)
return true;
- if (overrideDefinition.isInstanceOf(baseDefinition.getQualifiedName(), this))
+ if (overrideDefinition != null && baseDefinition != null &&
+ overrideDefinition.isInstanceOf(baseDefinition.getQualifiedName(), this))
return true;
return false;
}
[03/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - allow overridden return types to be a
subclass of the base class return type.
Posted by cd...@apache.org.
allow overridden return types to be a subclass of the base class return type.
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/bc9edf35
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/bc9edf35
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/bc9edf35
Branch: refs/heads/feature/maven-migration
Commit: bc9edf35a3f445cc50170b0c94e169570ab993ba
Parents: 8ea2b99
Author: Alex Harui <ah...@apache.org>
Authored: Fri Mar 18 13:42:22 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Mar 21 21:01:44 2016 -0700
----------------------------------------------------------------------
.../codegen/js/flexjs/TestFlexJSProject.java | 43 +++++++++
.../flexjs/projects/bad_overrides/Test.as | 43 +++++++++
.../projects/bad_overrides/Test_result.js | 94 ++++++++++++++++++++
.../flexjs/projects/bad_overrides/classes/A.as | 41 +++++++++
.../projects/bad_overrides/classes/A_result.js | 92 +++++++++++++++++++
.../flexjs/projects/bad_overrides/classes/B.as | 25 ++++++
.../projects/bad_overrides/classes/B_result.js | 69 ++++++++++++++
.../flexjs/projects/bad_overrides/classes/C.as | 25 ++++++
.../projects/bad_overrides/classes/C_result.js | 69 ++++++++++++++
.../projects/bad_overrides/interfaces/IA.as | 28 ++++++
.../bad_overrides/interfaces/IA_result.js | 69 ++++++++++++++
.../projects/bad_overrides/interfaces/IB.as | 22 +++++
.../bad_overrides/interfaces/IB_result.js | 62 +++++++++++++
.../projects/bad_overrides/interfaces/IC.as | 22 +++++
.../bad_overrides/interfaces/IC_result.js | 62 +++++++++++++
.../flexjs/projects/overrides/Test.as | 43 +++++++++
.../flexjs/projects/overrides/Test_result.js | 94 ++++++++++++++++++++
.../flexjs/projects/overrides/classes/A.as | 41 +++++++++
.../projects/overrides/classes/A_result.js | 92 +++++++++++++++++++
.../flexjs/projects/overrides/classes/B.as | 25 ++++++
.../projects/overrides/classes/B_result.js | 69 ++++++++++++++
.../flexjs/projects/overrides/classes/C.as | 25 ++++++
.../projects/overrides/classes/C_result.js | 74 +++++++++++++++
.../flexjs/projects/overrides/interfaces/IA.as | 28 ++++++
.../projects/overrides/interfaces/IA_result.js | 69 ++++++++++++++
.../flexjs/projects/overrides/interfaces/IB.as | 22 +++++
.../projects/overrides/interfaces/IB_result.js | 62 +++++++++++++
.../flexjs/projects/overrides/interfaces/IC.as | 22 +++++
.../projects/overrides/interfaces/IC_result.js | 65 ++++++++++++++
.../internal/projects/FlexJSProject.java | 10 +++
.../definitions/FunctionDefinition.java | 2 +-
.../internal/projects/CompilerProject.java | 5 ++
.../compiler/projects/ICompilerProject.java | 7 ++
33 files changed, 1520 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
index a82736c..feba941 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
@@ -126,6 +126,49 @@ public class TestFlexJSProject extends TestGoogProject
}
@Test
+ public void test_Overrides()
+ {
+ String testDirPath = projectDirPath + "/overrides";
+
+ String fileName = "Test";
+
+ sourcePath = new File(TestAdapterFactory.getTestAdapter().getUnitTestBaseDir(),
+ projectDirPath + "/overrides").getPath();
+
+ StringBuilder sb = new StringBuilder();
+ List<String> compiledFileNames = compileProject(fileName, testDirPath, sb, false);
+
+ assertProjectOut(compiledFileNames, testDirPath);
+ }
+
+ @Test
+ public void test_Bad_Overrides()
+ {
+ String testDirPath = projectDirPath + "/bad_overrides";
+
+ String fileName = "Test";
+
+ sourcePath = new File(TestAdapterFactory.getTestAdapter().getUnitTestBaseDir(),
+ projectDirPath + "/bad_overrides").getPath();
+
+ StringBuilder sb = new StringBuilder();
+ compileProject(fileName, testDirPath, sb, false);
+
+ String out = sb.toString();
+ out = out.replace("\\", "/");
+
+ String expected = "test-files/flexjs/projects/bad_overrides/Test.as(31:29)\n" +
+ "interface method someFunction in interface IA is implemented with an incompatible signature in class Test\n" +
+ "test-files/flexjs/projects/bad_overrides/Test.as(36:26)\n" +
+ "interface method someOtherFunction in interface IA is implemented with an incompatible signature in class Test\n" +
+ "test-files/flexjs/projects/bad_overrides/Test.as(31:29)\n" +
+ "Incompatible override.\n" +
+ "test-files/flexjs/projects/bad_overrides/Test.as(36:26)\n" +
+ "Incompatible override.\n";
+ assertThat(out, is(expected));
+ }
+
+ @Test
public void test_PackageConflict_AmbiguousDefinition()
{
String testDirPath = projectDirPath + "/package_conflicts_ambiguous_definition";
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/Test.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/Test.as b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/Test.as
new file mode 100644
index 0000000..9190d6e
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/Test.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ import classes.A;
+ import classes.C;
+ import interfaces.IC;
+
+ public class Test extends A
+ {
+ public function Test()
+ {
+ super();
+ }
+
+ override public function someFunction():C
+ {
+ return null;
+ }
+
+ override public function someOtherFunction():IC
+ {
+ return null;
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/Test_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/Test_result.js b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/Test_result.js
new file mode 100644
index 0000000..8f8fd20
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/Test_result.js
@@ -0,0 +1,94 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Test
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('Test');
+
+goog.require('classes.A');
+
+
+
+/**
+ * @constructor
+ * @extends {classes.A}
+ */
+Test = function() {
+ Test.base(this, 'constructor');
+};
+goog.inherits(Test, classes.A);
+
+
+/**
+ * @export
+ * @override
+ */
+Test.prototype.someFunction = function() {
+ return null;
+};
+
+
+/**
+ * @export
+ * @override
+ */
+Test.prototype.someOtherFunction = function() {
+ return null;
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+Test.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Test', qName: 'Test'}] };
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Test', Test);
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+Test.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ 'Test': { type: '', declaredBy: 'Test'},
+ 'someFunction': { type: 'C', declaredBy: 'Test'},
+ 'someOtherFunction': { type: 'IC', declaredBy: 'Test'}
+ };
+ }
+ };
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/A.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/A.as b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/A.as
new file mode 100644
index 0000000..004a607
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/A.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package classes
+{
+ import interfaces.IA;
+ import interfaces.IB;
+
+ public class A implements IA
+ {
+ public function A()
+ {
+ }
+
+ public function someFunction():B
+ {
+ return null;
+ }
+
+ public function someOtherFunction():IB
+ {
+ return null;
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/A_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/A_result.js b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/A_result.js
new file mode 100644
index 0000000..e3320af
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/A_result.js
@@ -0,0 +1,92 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * classes.A
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('classes.A');
+
+goog.require('interfaces.IA');
+
+
+
+/**
+ * @constructor
+ * @implements {interfaces.IA}
+ */
+classes.A = function() {
+};
+
+
+/**
+ * @export
+ * @return {classes.B}
+ */
+classes.A.prototype.someFunction = function() {
+ return null;
+};
+
+
+/**
+ * @export
+ * @return {interfaces.IB}
+ */
+classes.A.prototype.someOtherFunction = function() {
+ return null;
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+classes.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'classes.A'}], interfaces: [interfaces.IA] };
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.A', classes.A);
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+classes.A.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ 'A': { type: '', declaredBy: 'classes.A'},
+ 'someFunction': { type: 'B', declaredBy: 'classes.A'},
+ 'someOtherFunction': { type: 'IB', declaredBy: 'classes.A'}
+ };
+ }
+ };
+};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/B.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/B.as b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/B.as
new file mode 100644
index 0000000..b410e59
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/B.as
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package classes
+{
+ public class B
+ {
+ public function B() {}
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/B_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/B_result.js b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/B_result.js
new file mode 100644
index 0000000..8aaa2f7
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/B_result.js
@@ -0,0 +1,69 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * classes.B
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('classes.B');
+
+
+
+/**
+ * @constructor
+ */
+classes.B = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+classes.B.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'B', qName: 'classes.B'}] };
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.B', classes.B);
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+classes.B.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ 'B': { type: '', declaredBy: 'classes.B'}
+ };
+ }
+ };
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/C.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/C.as b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/C.as
new file mode 100644
index 0000000..d414a26
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/C.as
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package classes
+{
+ public class C
+ {
+ public function C() {}
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/C_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/C_result.js b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/C_result.js
new file mode 100644
index 0000000..46f094f
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/classes/C_result.js
@@ -0,0 +1,69 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * classes.C
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('classes.C');
+
+
+
+/**
+ * @constructor
+ */
+classes.C = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+classes.C.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'C', qName: 'classes.C'}] };
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.C', classes.C);
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+classes.C.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ 'C': { type: '', declaredBy: 'classes.C'}
+ };
+ }
+ };
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IA.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IA.as b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IA.as
new file mode 100644
index 0000000..6f363bc
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IA.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package interfaces
+{
+ import classes.B;
+
+ public interface IA
+ {
+ function someFunction():B;
+ function someOtherFunction():IB;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IA_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IA_result.js b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IA_result.js
new file mode 100644
index 0000000..04220e1
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IA_result.js
@@ -0,0 +1,69 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * interfaces.IA
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('interfaces.IA');
+
+
+
+
+/**
+ * @interface
+ */
+interfaces.IA = function() {
+};
+interfaces.IA.prototype.someFunction = function() {
+};
+interfaces.IA.prototype.someOtherFunction = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+interfaces.IA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IA', qName: 'interfaces.IA'}] };
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+interfaces.IA.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ 'someFunction': { type: 'B', declaredBy: 'interfaces.IA'},
+ 'someOtherFunction': { type: 'IB', declaredBy: 'interfaces.IA'}
+ };
+ }
+ };
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IB.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IB.as b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IB.as
new file mode 100644
index 0000000..a995635
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IB.as
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package interfaces
+{
+ public interface IB {}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IB_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IB_result.js b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IB_result.js
new file mode 100644
index 0000000..01a7fe6
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IB_result.js
@@ -0,0 +1,62 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * interfaces.IB
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('interfaces.IB');
+
+
+
+/**
+ * @interface
+ */
+interfaces.IB = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+interfaces.IB.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IB', qName: 'interfaces.IB'}] };
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+interfaces.IB.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ };
+ }
+ };
+};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IC.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IC.as b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IC.as
new file mode 100644
index 0000000..3a650c7
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IC.as
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package interfaces
+{
+ public interface IC {}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IC_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IC_result.js b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IC_result.js
new file mode 100644
index 0000000..f9b77c6
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/bad_overrides/interfaces/IC_result.js
@@ -0,0 +1,62 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * interfaces.IC
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('interfaces.IC');
+
+
+
+/**
+ * @interface
+ */
+interfaces.IC = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+interfaces.IC.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IC', qName: 'interfaces.IC'}]};
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+interfaces.IC.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ };
+ }
+ };
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/Test.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/Test.as b/compiler.jx.tests/test-files/flexjs/projects/overrides/Test.as
new file mode 100644
index 0000000..9190d6e
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/Test.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ import classes.A;
+ import classes.C;
+ import interfaces.IC;
+
+ public class Test extends A
+ {
+ public function Test()
+ {
+ super();
+ }
+
+ override public function someFunction():C
+ {
+ return null;
+ }
+
+ override public function someOtherFunction():IC
+ {
+ return null;
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/Test_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/Test_result.js b/compiler.jx.tests/test-files/flexjs/projects/overrides/Test_result.js
new file mode 100644
index 0000000..8f8fd20
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/Test_result.js
@@ -0,0 +1,94 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Test
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('Test');
+
+goog.require('classes.A');
+
+
+
+/**
+ * @constructor
+ * @extends {classes.A}
+ */
+Test = function() {
+ Test.base(this, 'constructor');
+};
+goog.inherits(Test, classes.A);
+
+
+/**
+ * @export
+ * @override
+ */
+Test.prototype.someFunction = function() {
+ return null;
+};
+
+
+/**
+ * @export
+ * @override
+ */
+Test.prototype.someOtherFunction = function() {
+ return null;
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+Test.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Test', qName: 'Test'}] };
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('Test', Test);
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+Test.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ 'Test': { type: '', declaredBy: 'Test'},
+ 'someFunction': { type: 'C', declaredBy: 'Test'},
+ 'someOtherFunction': { type: 'IC', declaredBy: 'Test'}
+ };
+ }
+ };
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/A.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/A.as b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/A.as
new file mode 100644
index 0000000..004a607
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/A.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package classes
+{
+ import interfaces.IA;
+ import interfaces.IB;
+
+ public class A implements IA
+ {
+ public function A()
+ {
+ }
+
+ public function someFunction():B
+ {
+ return null;
+ }
+
+ public function someOtherFunction():IB
+ {
+ return null;
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/A_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/A_result.js b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/A_result.js
new file mode 100644
index 0000000..e3320af
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/A_result.js
@@ -0,0 +1,92 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * classes.A
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('classes.A');
+
+goog.require('interfaces.IA');
+
+
+
+/**
+ * @constructor
+ * @implements {interfaces.IA}
+ */
+classes.A = function() {
+};
+
+
+/**
+ * @export
+ * @return {classes.B}
+ */
+classes.A.prototype.someFunction = function() {
+ return null;
+};
+
+
+/**
+ * @export
+ * @return {interfaces.IB}
+ */
+classes.A.prototype.someOtherFunction = function() {
+ return null;
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+classes.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'classes.A'}], interfaces: [interfaces.IA] };
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.A', classes.A);
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+classes.A.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ 'A': { type: '', declaredBy: 'classes.A'},
+ 'someFunction': { type: 'B', declaredBy: 'classes.A'},
+ 'someOtherFunction': { type: 'IB', declaredBy: 'classes.A'}
+ };
+ }
+ };
+};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/B.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/B.as b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/B.as
new file mode 100644
index 0000000..b410e59
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/B.as
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package classes
+{
+ public class B
+ {
+ public function B() {}
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/B_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/B_result.js b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/B_result.js
new file mode 100644
index 0000000..8aaa2f7
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/B_result.js
@@ -0,0 +1,69 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * classes.B
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('classes.B');
+
+
+
+/**
+ * @constructor
+ */
+classes.B = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+classes.B.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'B', qName: 'classes.B'}] };
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.B', classes.B);
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+classes.B.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ 'B': { type: '', declaredBy: 'classes.B'}
+ };
+ }
+ };
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/C.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/C.as b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/C.as
new file mode 100644
index 0000000..e2e4c8f
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/C.as
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package classes
+{
+ public class C extends B
+ {
+ public function C() {}
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/C_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/C_result.js b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/C_result.js
new file mode 100644
index 0000000..208d51c
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/classes/C_result.js
@@ -0,0 +1,74 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * classes.C
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('classes.C');
+
+goog.require('classes.B');
+
+
+
+/**
+ * @constructor
+ * @extends {classes.B}
+ */
+classes.C = function() {
+ classes.C.base(this, 'constructor');
+};
+goog.inherits(classes.C, classes.B);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+classes.C.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'C', qName: 'classes.C'}] };
+
+
+/**
+ * Prevent renaming of class. Needed for reflection.
+ */
+goog.exportSymbol('classes.C', classes.C);
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+classes.C.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ 'C': { type: '', declaredBy: 'classes.C'}
+ };
+ }
+ };
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IA.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IA.as b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IA.as
new file mode 100644
index 0000000..6f363bc
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IA.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package interfaces
+{
+ import classes.B;
+
+ public interface IA
+ {
+ function someFunction():B;
+ function someOtherFunction():IB;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IA_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IA_result.js b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IA_result.js
new file mode 100644
index 0000000..04220e1
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IA_result.js
@@ -0,0 +1,69 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * interfaces.IA
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('interfaces.IA');
+
+
+
+
+/**
+ * @interface
+ */
+interfaces.IA = function() {
+};
+interfaces.IA.prototype.someFunction = function() {
+};
+interfaces.IA.prototype.someOtherFunction = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+interfaces.IA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IA', qName: 'interfaces.IA'}] };
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+interfaces.IA.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ 'someFunction': { type: 'B', declaredBy: 'interfaces.IA'},
+ 'someOtherFunction': { type: 'IB', declaredBy: 'interfaces.IA'}
+ };
+ }
+ };
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IB.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IB.as b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IB.as
new file mode 100644
index 0000000..a995635
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IB.as
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package interfaces
+{
+ public interface IB {}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IB_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IB_result.js b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IB_result.js
new file mode 100644
index 0000000..01a7fe6
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IB_result.js
@@ -0,0 +1,62 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * interfaces.IB
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('interfaces.IB');
+
+
+
+/**
+ * @interface
+ */
+interfaces.IB = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+interfaces.IB.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IB', qName: 'interfaces.IB'}] };
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+interfaces.IB.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ };
+ }
+ };
+};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IC.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IC.as b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IC.as
new file mode 100644
index 0000000..b2440bf
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IC.as
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package interfaces
+{
+ public interface IC extends IB {}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IC_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IC_result.js b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IC_result.js
new file mode 100644
index 0000000..1af780a
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/projects/overrides/interfaces/IC_result.js
@@ -0,0 +1,65 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * interfaces.IC
+ *
+ * @fileoverview
+ *
+ * @suppress {checkTypes|accessControls}
+ */
+
+goog.provide('interfaces.IC');
+
+goog.require('interfaces.IB');
+
+
+
+/**
+ * @interface
+ * @extends {interfaces.IB}
+ */
+interfaces.IC = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+interfaces.IC.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IC', qName: 'interfaces.IC'}], interfaces: [interfaces.IB] };
+
+
+
+/**
+ * Reflection
+ *
+ * @return {Object.<string, Function>}
+ */
+interfaces.IC.prototype.FLEXJS_REFLECTION_INFO = function () {
+ return {
+ variables: function () {
+ return {
+ };
+ },
+ accessors: function () {
+ return {
+ };
+ },
+ methods: function () {
+ return {
+ };
+ }
+ };
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java b/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
index bcae9ef..67657f7 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
@@ -26,6 +26,7 @@ import java.util.Set;
import org.apache.flex.compiler.common.DependencyType;
import org.apache.flex.compiler.definitions.IDefinition;
+import org.apache.flex.compiler.definitions.ITypeDefinition;
import org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSEmitterTokens;
import org.apache.flex.compiler.internal.css.codegen.CSSCompilationSession;
import org.apache.flex.compiler.internal.definitions.InterfaceDefinition;
@@ -260,4 +261,13 @@ public class FlexJSProject extends FlexProject
}
}
+ @Override
+ public boolean isCompatibleOverrideReturnType(ITypeDefinition overrideDefinition, ITypeDefinition baseDefinition)
+ {
+ if (baseDefinition == overrideDefinition)
+ return true;
+ if (overrideDefinition.isInstanceOf(baseDefinition.getQualifiedName(), this))
+ return true;
+ return false;
+ }
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler/src/org/apache/flex/compiler/internal/definitions/FunctionDefinition.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/definitions/FunctionDefinition.java b/compiler/src/org/apache/flex/compiler/internal/definitions/FunctionDefinition.java
index db64fee..7a59d80 100644
--- a/compiler/src/org/apache/flex/compiler/internal/definitions/FunctionDefinition.java
+++ b/compiler/src/org/apache/flex/compiler/internal/definitions/FunctionDefinition.java
@@ -455,7 +455,7 @@ public class FunctionDefinition extends ScopedDefinitionBase implements IFunctio
// Compare return types.
ITypeDefinition returnType1 = resolveReturnType(project);
ITypeDefinition returnType2 = other.resolveReturnType(project);
- if (returnType1 != returnType2)
+ if (!project.isCompatibleOverrideReturnType(returnType1, returnType2))
return false;
// Compare parameters.
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler/src/org/apache/flex/compiler/internal/projects/CompilerProject.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/projects/CompilerProject.java b/compiler/src/org/apache/flex/compiler/internal/projects/CompilerProject.java
index 4914cc6..bf00fa8 100644
--- a/compiler/src/org/apache/flex/compiler/internal/projects/CompilerProject.java
+++ b/compiler/src/org/apache/flex/compiler/internal/projects/CompilerProject.java
@@ -996,4 +996,9 @@ public abstract class CompilerProject implements ICompilerProject
{
this.problems = problems;
}
+
+ public boolean isCompatibleOverrideReturnType(ITypeDefinition overrideDefinition, ITypeDefinition baseDefinition)
+ {
+ return (baseDefinition == overrideDefinition);
+ }
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bc9edf35/compiler/src/org/apache/flex/compiler/projects/ICompilerProject.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/projects/ICompilerProject.java b/compiler/src/org/apache/flex/compiler/projects/ICompilerProject.java
index 2610c01..d4ef3ef 100644
--- a/compiler/src/org/apache/flex/compiler/projects/ICompilerProject.java
+++ b/compiler/src/org/apache/flex/compiler/projects/ICompilerProject.java
@@ -222,4 +222,11 @@ public interface ICompilerProject
* can add a problem if they don't have another place to add them.
*/
void setProblems(Collection<ICompilerProblem> problems);
+
+ /**
+ * @param overrideDefinition The definition overriding the base definition.
+ * @param baseDefinition The definition being overridden.
+ * @return True if compatible (default is if they are the same)
+ */
+ boolean isCompatibleOverrideReturnType(ITypeDefinition overrideDefinition, ITypeDefinition baseDefinition);
}
[08/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - - Continued making the Unit-Tests use
the TestAdapters - Fixed and re-enabled the TestExternJQuery test
Posted by cd...@apache.org.
- Continued making the Unit-Tests use the TestAdapters
- Fixed and re-enabled the TestExternJQuery test
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/a5b8b0f8
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/a5b8b0f8
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/a5b8b0f8
Branch: refs/heads/feature/maven-migration
Commit: a5b8b0f8ac7a31fe7d6a9d58b427053bac33f90f
Parents: 6541ded
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Tue Mar 22 23:18:13 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Tue Mar 22 23:18:13 2016 +0100
----------------------------------------------------------------------
.../codegen/externals/ExternalsTestUtils.java | 3 +++
.../codegen/externals/TestExternJQuery.java | 4 +---
.../externals/TestExternalsJSCompile.java | 16 +++++++-------
.../codegen/js/flexjs/TestFlexJSProject.java | 13 +++++++----
.../codegen/js/vf2js/TestVF2JSFile.java | 14 ++++++------
.../mxml/flexjs/TestFlexJSMXMLApplication.java | 23 ++++++++++++--------
.../mxml/vf2js/TestVF2JSMXMLApplication.java | 8 ++++---
.../compiler/internal/test/FlexJSTestBase.java | 5 ++++-
.../compiler/internal/test/VF2JSTestBase.java | 8 ++++---
.../org/apache/flex/utils/AntTestAdapter.java | 2 +-
10 files changed, 57 insertions(+), 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a5b8b0f8/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestUtils.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestUtils.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestUtils.java
index 2c27ee7..7956e25 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestUtils.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestUtils.java
@@ -41,6 +41,9 @@ public class ExternalsTestUtils
public static File EXTERNAL_JS_DIR = FilenameNormalization.normalize(new File(
"../externs/js/externs"));
+ public static File EXTERNAL_JQUERY_DIR = FilenameNormalization.normalize(new File(
+ "../externs/jquery/externs"));
+
public static File EXTERNAL_JASMINE_DIR = FilenameNormalization.normalize(new File(
"../externs/jasmine/externs"));
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a5b8b0f8/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/TestExternJQuery.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/TestExternJQuery.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/TestExternJQuery.java
index bbb41f9..7a2c1d0 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/TestExternJQuery.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/TestExternJQuery.java
@@ -26,12 +26,10 @@ import java.io.IOException;
import org.apache.flex.compiler.clients.ExternCConfiguration;
import org.apache.flex.compiler.internal.codegen.externals.reference.ClassReference;
-import org.junit.Ignore;
import org.junit.Test;
import com.google.javascript.jscomp.Result;
-@Ignore
public class TestExternJQuery extends ExternalsTestBase
{
@SuppressWarnings("unused")
@@ -62,7 +60,7 @@ public class TestExternJQuery extends ExternalsTestBase
{
config.setASRoot(ExternalsTestUtils.AS_ROOT_DIR);
- String coreRoot = ExternalsTestUtils.EXTERNAL_JS_DIR.getAbsolutePath();
+ String coreRoot = ExternalsTestUtils.EXTERNAL_JQUERY_DIR.getAbsolutePath();
config.addExternal(coreRoot + "/jquery-1.9.js");
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a5b8b0f8/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/TestExternalsJSCompile.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/TestExternalsJSCompile.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/TestExternalsJSCompile.java
index 3d12ad1..feff678 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/TestExternalsJSCompile.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/externals/TestExternalsJSCompile.java
@@ -44,6 +44,8 @@ import org.apache.flex.compiler.problems.ICompilerProblem;
import org.apache.flex.compiler.units.ICompilationUnit;
import org.apache.flex.compiler.visitor.as.IASBlockWalker;
import org.apache.flex.utils.FilenameNormalization;
+import org.apache.flex.utils.ITestAdapter;
+import org.apache.flex.utils.TestAdapterFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -53,17 +55,15 @@ import com.google.common.collect.Iterables;
public class TestExternalsJSCompile
{
- private static File tempDir = new File(
- FilenameNormalization.normalize("temp"));
+ private static ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
- private static File app1ASSrcDir = new File(
- FilenameNormalization.normalize("test-files/externals/app1/as_src"));
+ private static File tempDir = new File(testAdapter.getTempDir());
- private static File app1AJSSrcDir = new File(
- FilenameNormalization.normalize("temp/externals/app1/js_src"));
+ private static File app1ASSrcDir = new File(testAdapter.getUnitTestBaseDir(), "externals/app1/as_src");
- private static File jsSWCFile = new File(
- FilenameNormalization.normalize("temp/externals/bin/JS.swc"));
+ private static File app1AJSSrcDir = new File(testAdapter.getTempDir(), "externals/app1/js_src");
+
+ private static File jsSWCFile = new File(testAdapter.getTempDir(), "externals/bin/JS.swc");
protected static Workspace workspace = new Workspace();
protected FlexJSProject project;
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a5b8b0f8/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
index 7a739c1..b20d8f5 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
@@ -35,6 +35,7 @@ import org.apache.flex.compiler.internal.driver.js.flexjs.FlexJSBackend;
import org.apache.flex.compiler.internal.driver.js.goog.JSGoogConfiguration;
import org.apache.flex.compiler.internal.projects.FlexJSProject;
import org.apache.flex.utils.FilenameNormalization;
+import org.apache.flex.utils.ITestAdapter;
import org.apache.flex.utils.TestAdapterFactory;
import org.junit.Ignore;
import org.junit.Test;
@@ -47,10 +48,11 @@ import org.junit.Test;
*/
public class TestFlexJSProject extends TestGoogProject
{
+ private static ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
private static String projectDirPath = "flexjs/projects";
- protected String sourcePath;
- protected Collection<String> externs = new ArrayList<String>();
+ private String sourcePath;
+ private Collection<String> externs = new ArrayList<String>();
@Override
public void setUp()
@@ -205,8 +207,11 @@ public class TestFlexJSProject extends TestGoogProject
String out = sb.toString();
out = out.replace("\\", "/");
-
- assertThat(out, is("test-files/flexjs/projects/package_conflicts_ambiguous_definition/mypackage/TestClass.as(29:20)\nAmbiguous reference to Event\ntest-files/flexjs/projects/package_conflicts_ambiguous_definition/mypackage/TestClass.as(30:41)\nAmbiguous reference to Event\n"));
+
+ assertThat(out, is(testAdapter.getUnitTestBaseDir().getPath() +
+ "/flexjs/projects/package_conflicts_ambiguous_definition/mypackage/TestClass.as(29:20)\nAmbiguous reference to Event\n" +
+ testAdapter.getUnitTestBaseDir().getPath() +
+ "/flexjs/projects/package_conflicts_ambiguous_definition/mypackage/TestClass.as(30:41)\nAmbiguous reference to Event\n"));
}
@Test
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a5b8b0f8/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSFile.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSFile.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSFile.java
index 5c1c913..eaa79d3 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSFile.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSFile.java
@@ -26,7 +26,7 @@ import org.apache.flex.compiler.driver.IBackend;
import org.apache.flex.compiler.internal.driver.js.vf2js.VF2JSBackend;
import org.apache.flex.compiler.internal.test.VF2JSTestBase;
import org.apache.flex.compiler.tree.as.IFileNode;
-import org.apache.flex.utils.FilenameNormalization;
+import org.apache.flex.utils.ITestAdapter;
import org.apache.flex.utils.TestAdapterFactory;
import org.junit.Ignore;
import org.junit.Test;
@@ -39,15 +39,16 @@ import org.junit.Test;
*/
public class TestVF2JSFile extends VF2JSTestBase
{
- @Ignore
+ private static ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
+
+ @Ignore
@Test
public void testSimple()
{
String fileName = "SimpleAS";
IFileNode node = compileAS(fileName, true,
- new File(TestAdapterFactory.getTestAdapter().getUnitTestBaseDir(),
- "vf2js/files").getPath(),
+ new File(testAdapter.getUnitTestBaseDir(), "vf2js/files").getPath(),
false);
asBlockWalker.visitFile(node);
@@ -64,8 +65,7 @@ public class TestVF2JSFile extends VF2JSTestBase
String fileName = "Version";
IFileNode node = compileAS(fileName, true,
- new File(TestAdapterFactory.getTestAdapter().getUnitTestBaseDir(),
- "vf2js/files").getPath(),
+ new File(testAdapter.getUnitTestBaseDir(), "vf2js/files").getPath(),
false);
asBlockWalker.visitFile(node);
@@ -79,7 +79,7 @@ public class TestVF2JSFile extends VF2JSTestBase
@Override
protected void addSourcePaths(List<File> sourcePaths)
{
- sourcePaths.add(new File(FilenameNormalization.normalize("test-files/vf2js/files")));
+ sourcePaths.add(new File(testAdapter.getUnitTestBaseDir(), "vf2js/files"));
super.addSourcePaths(sourcePaths);
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a5b8b0f8/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
index 474f496..fc5ce66 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
@@ -24,11 +24,16 @@ import org.apache.flex.compiler.internal.projects.FlexJSProject;
import org.apache.flex.compiler.internal.test.FlexJSTestBase;
import org.apache.flex.compiler.tree.mxml.IMXMLDocumentNode;
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
-import org.apache.flex.compiler.tree.mxml.IMXMLScriptNode;
+import org.apache.flex.utils.ITestAdapter;
+import org.apache.flex.utils.TestAdapterFactory;
import org.junit.Test;
+import java.io.File;
+
public class TestFlexJSMXMLApplication extends FlexJSTestBase
{
+ private static ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
+
@Override
public void setUp()
{
@@ -42,7 +47,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
String fileName = "wildcard_import";
IMXMLFileNode node = compileMXML(fileName, true,
- "test-files/flexjs/files", false);
+ new File(testAdapter.getUnitTestBaseDir(), "flexjs/files").getPath(), false);
mxmlBlockWalker.visitFile(node);
@@ -57,7 +62,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
String fileName = "FlexJSTest_again";
IMXMLFileNode node = compileMXML(fileName, true,
- "test-files/flexjs/files", false);
+ new File(testAdapter.getUnitTestBaseDir(), "flexjs/files").getPath(), false);
mxmlBlockWalker.visitFile(node);
@@ -72,7 +77,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
String fileName = "MyInitialView";
IMXMLFileNode node = compileMXML(fileName, true,
- "test-files/flexjs/files", false);
+ new File(testAdapter.getUnitTestBaseDir(), "flexjs/files").getPath(), false);
mxmlBlockWalker.visitFile(node);
@@ -80,7 +85,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
assertOutWithMetadata(getCodeFromFile(fileName + "_result", true, "flexjs/files"));
}
-
+
@Test
public void testInterfaceAttribute()
{
@@ -156,7 +161,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
" return {\n" +
" variables: function () {\n" +
" return {\n" +
- " };\n" +
+ " };\n" +
" },\n" +
" accessors: function () {\n" +
" return {\n" +
@@ -171,7 +176,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
"\n" +
"\n" +
"\n";
-
+
assertOutWithMetadata(outTemplate.replaceAll("AppName", appName));
}
@@ -252,7 +257,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
" return {\n" +
" variables: function () {\n" +
" return {\n" +
- " };\n" +
+ " };\n" +
" },\n" +
" accessors: function () {\n" +
" return {\n" +
@@ -267,7 +272,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
"\n" +
"\n" +
"\n";
-
+
assertOutWithMetadata(outTemplate.replaceAll("AppName", appName));
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a5b8b0f8/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/TestVF2JSMXMLApplication.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/TestVF2JSMXMLApplication.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/TestVF2JSMXMLApplication.java
index 2a5d268..72bbc3d 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/TestVF2JSMXMLApplication.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/TestVF2JSMXMLApplication.java
@@ -27,17 +27,19 @@ import java.util.List;
import org.apache.flex.compiler.internal.test.VF2JSMXMLTestBase;
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
import org.apache.flex.utils.FilenameNormalization;
+import org.apache.flex.utils.ITestAdapter;
import org.apache.flex.utils.TestAdapterFactory;
import org.junit.Test;
public class TestVF2JSMXMLApplication extends VF2JSMXMLTestBase
{
+ private static ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
@Override
protected void addSourcePaths(List<File> sourcePaths)
{
- sourcePaths.add(new File(FilenameNormalization.normalize("test-files/vf2js/files")));
- sourcePaths.add(new File(FilenameNormalization.normalize("test-files/vf2js/projects/simpleMXML/src")));
+ sourcePaths.add(new File(testAdapter.getUnitTestBaseDir(), "vf2js/files"));
+ sourcePaths.add(new File(testAdapter.getUnitTestBaseDir(), "vf2js/projects/simpleMXML/src"));
super.addSourcePaths(sourcePaths);
}
@@ -48,7 +50,7 @@ public class TestVF2JSMXMLApplication extends VF2JSMXMLTestBase
String fileName = "SimpleMXML";
IMXMLFileNode node = compileMXML(fileName, true,
- "test-files/vf2js/files", false);
+ new File(testAdapter.getUnitTestBaseDir(), "vf2js/files").getPath(), false);
mxmlBlockWalker.visitFile(node);
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a5b8b0f8/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
index e1c5056..203d16a 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
@@ -29,11 +29,14 @@ import org.apache.flex.compiler.mxml.IMXMLNamespaceMapping;
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
import org.apache.flex.compiler.tree.mxml.IMXMLNode;
import org.apache.flex.utils.FilenameNormalization;
+import org.apache.flex.utils.ITestAdapter;
+import org.apache.flex.utils.TestAdapterFactory;
import org.junit.Ignore;
@Ignore
public class FlexJSTestBase extends TestBase
{
+ protected static ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
@Override
public void setUp()
@@ -83,7 +86,7 @@ public class FlexJSTestBase extends TestBase
protected void addSourcePaths(List<File> sourcePaths)
{
sourcePaths.add(new File(env.ASJS + "/examples/FlexJSTest_basic/src"));
- sourcePaths.add(new File(FilenameNormalization.normalize("test-files/flexjs/files")));
+ sourcePaths.add(new File(testAdapter.getUnitTestBaseDir(), "flexjs/files"));
super.addSourcePaths(sourcePaths);
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a5b8b0f8/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/VF2JSTestBase.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/VF2JSTestBase.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/VF2JSTestBase.java
index 3fee7eb..f6cbf58 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/VF2JSTestBase.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/VF2JSTestBase.java
@@ -36,6 +36,8 @@ import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
import org.apache.flex.compiler.tree.mxml.IMXMLNode;
import org.apache.flex.compiler.units.ICompilationUnit;
import org.apache.flex.utils.FilenameNormalization;
+import org.apache.flex.utils.ITestAdapter;
+import org.apache.flex.utils.TestAdapterFactory;
import org.junit.Ignore;
import com.google.common.collect.ImmutableSet;
@@ -44,6 +46,7 @@ import com.google.common.collect.Iterables;
@Ignore
public class VF2JSTestBase extends MXMLTestBase
{
+ private static ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
@Override
public void setUp()
@@ -84,9 +87,8 @@ public class VF2JSTestBase extends MXMLTestBase
{
List<String> compiledFileNames = new ArrayList<String>();
- String mainFileName = "test-files"
- + File.separator + inputDirName + File.separator
- + inputFileName + inputFileExtension;
+ String mainFileName = new File(testAdapter.getUnitTestBaseDir(),
+ inputDirName + "/" + inputFileName + inputFileExtension).getPath();
addDependencies();
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a5b8b0f8/compiler.tests/src/org/apache/flex/utils/AntTestAdapter.java
----------------------------------------------------------------------
diff --git a/compiler.tests/src/org/apache/flex/utils/AntTestAdapter.java b/compiler.tests/src/org/apache/flex/utils/AntTestAdapter.java
index c79c61a..cd3cb4f 100644
--- a/compiler.tests/src/org/apache/flex/utils/AntTestAdapter.java
+++ b/compiler.tests/src/org/apache/flex/utils/AntTestAdapter.java
@@ -101,7 +101,7 @@ public class AntTestAdapter implements ITestAdapter {
@Override
public File getUnitTestBaseDir() {
- return new File(FilenameNormalization.normalize("test-files"));
+ return new File("test-files");
}
private File getLib(String artifactId) {
[02/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - fix missing Array constants. The
cross-compiler generates the value as an inlined constant
Posted by cd...@apache.org.
fix missing Array constants. The cross-compiler generates the value as an inlined constant
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/0d4d8711
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/0d4d8711
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/0d4d8711
Branch: refs/heads/feature/maven-migration
Commit: 0d4d871178f554617d552c00d1afa43093c18e7a
Parents: bc9edf3
Author: Alex Harui <ah...@apache.org>
Authored: Sun Mar 20 22:16:57 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Mar 21 21:01:44 2016 -0700
----------------------------------------------------------------------
externs/js/missing.js | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/0d4d8711/externs/js/missing.js
----------------------------------------------------------------------
diff --git a/externs/js/missing.js b/externs/js/missing.js
index c0241d4..aedd69f 100644
--- a/externs/js/missing.js
+++ b/externs/js/missing.js
@@ -179,31 +179,31 @@ var console;
* @type {number}
* @const
*/
-Array.CASEINSENSITIVE = 1;
+Array.CASEINSENSITIVE;
/**
* @type {number}
* @const
*/
-Array.DESCENDING = 2;
+Array.DESCENDING;
/**
* @type {number}
* @const
*/
-Array.UNIQUESORT = 4;
+Array.UNIQUESORT;
/**
* @type {number}
* @const
*/
-Array.RETURNINDEXEDARRAY = 8;
+Array.RETURNINDEXEDARRAY;
/**
* @type {number}
* @const
*/
-Array.NUMERIC = 16;
+Array.NUMERIC;
/**
@@ -223,25 +223,25 @@ Array.prototype.removeAt = function(index) {};
* @type {number}
* @const
*/
-int.MAX_VALUE = 2147483648;
+int.MAX_VALUE;
/**
* @type {number}
* @const
*/
-int.MIN_VALUE = -2147483648;
+int.MIN_VALUE;
/**
* @type {number}
* @const
*/
-uint.MAX_VALUE = 4294967295;
+uint.MAX_VALUE;
/**
* @type {number}
* @const
*/
-uint.MIN_VALUE = 0;
+uint.MIN_VALUE;
[04/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - add -compiler.allow-subclass-overrides
option to build 'extern' swcs
Posted by cd...@apache.org.
add -compiler.allow-subclass-overrides option to build 'extern' swcs
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/69eb3d52
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/69eb3d52
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/69eb3d52
Branch: refs/heads/feature/maven-migration
Commit: 69eb3d52e6d592b4763d9ded7f65c08f9abef0ea
Parents: 0d5b35f
Author: Alex Harui <ah...@apache.org>
Authored: Mon Mar 21 08:18:12 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Mar 21 21:01:45 2016 -0700
----------------------------------------------------------------------
.../codegen/js/flexjs/TestFlexJSProject.java | 18 ++++++++++++++++++
.../codegen/js/jx/MemberAccessEmitter.java | 5 -----
.../compiler/internal/projects/FlexJSProject.java | 12 ------------
.../src/org/apache/flex/compiler/clients/ASC.java | 9 ++++++++-
.../flex/compiler/config/Configuration.java | 18 ++++++++++++++++++
.../compiler/internal/config/TargetSettings.java | 6 ++++++
.../compiler/internal/projects/FlexProject.java | 13 +++++++++++++
.../flex/compiler/targets/ITargetSettings.java | 6 ++++++
8 files changed, 69 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/69eb3d52/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
index feba941..7a739c1 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
@@ -28,7 +28,9 @@ import java.util.Collection;
import java.util.List;
import org.apache.flex.compiler.driver.IBackend;
+import org.apache.flex.compiler.exceptions.ConfigurationException;
import org.apache.flex.compiler.internal.codegen.js.goog.TestGoogProject;
+import org.apache.flex.compiler.internal.config.TargetSettings;
import org.apache.flex.compiler.internal.driver.js.flexjs.FlexJSBackend;
import org.apache.flex.compiler.internal.driver.js.goog.JSGoogConfiguration;
import org.apache.flex.compiler.internal.projects.FlexJSProject;
@@ -132,6 +134,14 @@ public class TestFlexJSProject extends TestGoogProject
String fileName = "Test";
+ try {
+ ((FlexJSProject)project).config.setCompilerAllowSubclassOverrides(null, true);
+ } catch (ConfigurationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ project.setTargetSettings(new TargetSettings(((FlexJSProject)project).config));
+
sourcePath = new File(TestAdapterFactory.getTestAdapter().getUnitTestBaseDir(),
projectDirPath + "/overrides").getPath();
@@ -148,6 +158,14 @@ public class TestFlexJSProject extends TestGoogProject
String fileName = "Test";
+ try {
+ ((FlexJSProject)project).config.setCompilerAllowSubclassOverrides(null, true);
+ } catch (ConfigurationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ project.setTargetSettings(new TargetSettings(((FlexJSProject)project).config));
+
sourcePath = new File(TestAdapterFactory.getTestAdapter().getUnitTestBaseDir(),
projectDirPath + "/bad_overrides").getPath();
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/69eb3d52/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
index 305b2e9..0421a5c 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
@@ -64,11 +64,6 @@ public class MemberAccessEmitter extends JSSubEmitter implements
IASNode leftNode = node.getLeftOperandNode();
IASNode rightNode = node.getRightOperandNode();
- String leftName = "";
- if (leftNode instanceof IdentifierNode)
- {
- leftName = ((IdentifierNode)leftNode).getName();
- }
JSFlexJSEmitter fjs = (JSFlexJSEmitter)getEmitter();
IDefinition def = node.resolve(getProject());
if (def == null)
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/69eb3d52/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java b/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
index 15cf7ab..a1098a7 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
@@ -26,7 +26,6 @@ import java.util.Set;
import org.apache.flex.compiler.common.DependencyType;
import org.apache.flex.compiler.definitions.IDefinition;
-import org.apache.flex.compiler.definitions.ITypeDefinition;
import org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSEmitterTokens;
import org.apache.flex.compiler.internal.css.codegen.CSSCompilationSession;
import org.apache.flex.compiler.internal.definitions.InterfaceDefinition;
@@ -260,15 +259,4 @@ public class FlexJSProject extends FlexProject
e.printStackTrace();
}
}
-
- @Override
- public boolean isCompatibleOverrideReturnType(ITypeDefinition overrideDefinition, ITypeDefinition baseDefinition)
- {
- if (baseDefinition == overrideDefinition)
- return true;
- if (overrideDefinition != null && baseDefinition != null &&
- overrideDefinition.isInstanceOf(baseDefinition.getQualifiedName(), this))
- return true;
- return false;
- }
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/69eb3d52/compiler/src/org/apache/flex/compiler/clients/ASC.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/clients/ASC.java b/compiler/src/org/apache/flex/compiler/clients/ASC.java
index 3befd95..432a445 100644
--- a/compiler/src/org/apache/flex/compiler/clients/ASC.java
+++ b/compiler/src/org/apache/flex/compiler/clients/ASC.java
@@ -447,7 +447,14 @@ public class ASC
@Override
public boolean getMxmlChildrenAsData()
{
- // Not used because ASC does not create SWCs.
+ // Not used because ASC does handle MXML.
+ return false;
+ }
+
+ @Override
+ public boolean getAllowSubclassOverrides()
+ {
+ // Not used because ASC is not used in cross-compiling.
return false;
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/69eb3d52/compiler/src/org/apache/flex/compiler/config/Configuration.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/config/Configuration.java b/compiler/src/org/apache/flex/compiler/config/Configuration.java
index ae20994..6516464 100644
--- a/compiler/src/org/apache/flex/compiler/config/Configuration.java
+++ b/compiler/src/org/apache/flex/compiler/config/Configuration.java
@@ -2324,6 +2324,24 @@ public class Configuration
}
//
+ // 'compiler.allow-subclass-overrides' option
+ //
+ private Boolean allowSubclassOverrides = false;
+
+ public Boolean getCompilerAllowSubclassOverrides()
+ {
+ return allowSubclassOverrides;
+ }
+
+ @Config
+ @Mapping({ "compiler", "allow-subclass-override" })
+ @FlexOnly
+ public void setCompilerAllowSubclassOverrides(ConfigurationValue cv, Boolean allow) throws ConfigurationException
+ {
+ allowSubclassOverrides = allow;
+ }
+
+ //
// 'compiler.mxml.implicitImports' option
//
private String[] implicitImports;
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/69eb3d52/compiler/src/org/apache/flex/compiler/internal/config/TargetSettings.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/config/TargetSettings.java b/compiler/src/org/apache/flex/compiler/internal/config/TargetSettings.java
index 0d84e88..03ba470 100644
--- a/compiler/src/org/apache/flex/compiler/internal/config/TargetSettings.java
+++ b/compiler/src/org/apache/flex/compiler/internal/config/TargetSettings.java
@@ -569,6 +569,12 @@ public class TargetSettings implements ITargetSettings
}
@Override
+ public boolean getAllowSubclassOverrides()
+ {
+ return configuration.getCompilerMxmlChildrenAsData();
+ }
+
+ @Override
public boolean getRemoveDeadCode()
{
return configuration.getRemoveDeadCode();
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/69eb3d52/compiler/src/org/apache/flex/compiler/internal/projects/FlexProject.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/projects/FlexProject.java b/compiler/src/org/apache/flex/compiler/internal/projects/FlexProject.java
index 9180fe1..6b44dd2 100644
--- a/compiler/src/org/apache/flex/compiler/internal/projects/FlexProject.java
+++ b/compiler/src/org/apache/flex/compiler/internal/projects/FlexProject.java
@@ -49,6 +49,7 @@ import org.apache.flex.compiler.definitions.INamespaceDefinition;
import org.apache.flex.compiler.definitions.IScopedDefinition;
import org.apache.flex.compiler.definitions.ISetterDefinition;
import org.apache.flex.compiler.definitions.IStyleDefinition;
+import org.apache.flex.compiler.definitions.ITypeDefinition;
import org.apache.flex.compiler.definitions.IVariableDefinition;
import org.apache.flex.compiler.definitions.references.INamespaceReference;
import org.apache.flex.compiler.definitions.references.IResolvedQualifiersReference;
@@ -2170,4 +2171,16 @@ public class FlexProject extends ASProject implements IFlexProject
{
return this.strictXML = strictXML;
}
+
+ @Override
+ public boolean isCompatibleOverrideReturnType(ITypeDefinition overrideDefinition, ITypeDefinition baseDefinition)
+ {
+ if (baseDefinition == overrideDefinition)
+ return true;
+ if (targetSettings != null && targetSettings.getAllowSubclassOverrides() && overrideDefinition != null && baseDefinition != null &&
+ overrideDefinition.isInstanceOf(baseDefinition.getQualifiedName(), this))
+ return true;
+ return false;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/69eb3d52/compiler/src/org/apache/flex/compiler/targets/ITargetSettings.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/targets/ITargetSettings.java b/compiler/src/org/apache/flex/compiler/targets/ITargetSettings.java
index 7300b02..f223f50 100644
--- a/compiler/src/org/apache/flex/compiler/targets/ITargetSettings.java
+++ b/compiler/src/org/apache/flex/compiler/targets/ITargetSettings.java
@@ -465,6 +465,12 @@ public interface ITargetSettings
boolean getMxmlChildrenAsData();
/**
+ * @return true if the return type of an override can be a subclass instead
+ * of an exact match as the base class' return type
+ */
+ boolean getAllowSubclassOverrides();
+
+ /**
* @return true if the dead code filtering optimization step is enabled.
*/
boolean getRemoveDeadCode();
[05/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - get compiler to redirect Array.sortOn
Posted by cd...@apache.org.
get compiler to redirect Array.sortOn
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/e736a120
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/e736a120
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/e736a120
Branch: refs/heads/feature/maven-migration
Commit: e736a1209ae642903da24182975f27ca272bf34b
Parents: 69eb3d5
Author: Alex Harui <ah...@apache.org>
Authored: Mon Mar 21 12:14:40 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Mar 21 21:01:45 2016 -0700
----------------------------------------------------------------------
.../js/flexjs/TestFlexJSGlobalClasses.java | 18 +++++++++++++++
.../codegen/js/jx/FunctionCallEmitter.java | 23 ++++++++++++++++++++
externs/js/missing.js | 6 +++++
3 files changed, 47 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e736a120/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
index 96a9a0a..df663af 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
@@ -141,6 +141,24 @@ public class TestFlexJSGlobalClasses extends TestGoogGlobalClasses
}
@Test
+ public void testArraySortOn()
+ {
+ IBinaryOperatorNode node = getBinaryNode("var a:Array = new Array(); a.sortOn('foo')");
+ IFunctionCallNode parentNode = (IFunctionCallNode)(node.getParent());
+ asBlockWalker.visitFunctionCall(parentNode);
+ assertOut("org.apache.flex.utils.Language.sortOn(a, 'foo')");
+ }
+
+ @Test
+ public void testArraySortOnTwoArgs()
+ {
+ IBinaryOperatorNode node = getBinaryNode("var a:Array = new Array(); a.sortOn('foo', 10)");
+ IFunctionCallNode parentNode = (IFunctionCallNode)(node.getParent());
+ asBlockWalker.visitFunctionCall(parentNode);
+ assertOut("org.apache.flex.utils.Language.sortOn(a, 'foo', 10)");
+ }
+
+ @Test
public void testIntConstMaxValue()
{
IVariableNode node = getVariable("var a:Number = int.MAX_VALUE");
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e736a120/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
index c38d820..475541e 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
@@ -33,6 +33,9 @@ import org.apache.flex.compiler.internal.definitions.ClassDefinition;
import org.apache.flex.compiler.internal.definitions.InterfaceDefinition;
import org.apache.flex.compiler.internal.projects.FlexJSProject;
import org.apache.flex.compiler.internal.tree.as.ContainerNode;
+import org.apache.flex.compiler.internal.tree.as.IdentifierNode;
+import org.apache.flex.compiler.internal.tree.as.MemberAccessExpressionNode;
+import org.apache.flex.compiler.internal.tree.as.NumericLiteralNode;
import org.apache.flex.compiler.internal.tree.as.VectorLiteralNode;
import org.apache.flex.compiler.projects.ICompilerProject;
import org.apache.flex.compiler.tree.ASTNodeID;
@@ -139,6 +142,26 @@ public class FunctionCallEmitter extends JSSubEmitter implements ISubEmitter<IFu
if (isInt)
write(JSFlexJSEmitterTokens.UNDERSCORE);
}
+ else if (def != null && def.getBaseName().equals("sortOn"))
+ {
+ if (def.getParent() != null &&
+ def.getParent().getQualifiedName().equals("Array"))
+ {
+ ICompilerProject project = this.getProject();
+ if (project instanceof FlexJSProject)
+ ((FlexJSProject) project).needLanguage = true;
+ write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
+ write(ASEmitterTokens.MEMBER_ACCESS);
+ write("sortOn");
+ write(ASEmitterTokens.PAREN_OPEN);
+ write(((IdentifierNode)cnode).getName()); // will this always be an indentifer node
+ writeToken(ASEmitterTokens.COMMA);
+ fjs.walkArguments(node.getArgumentNodes());
+ write(ASEmitterTokens.PAREN_CLOSE);
+ return;
+ }
+ }
+
else if (def instanceof AppliedVectorDefinition)
{
fjs.walkArguments(node.getArgumentNodes());
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e736a120/externs/js/missing.js
----------------------------------------------------------------------
diff --git a/externs/js/missing.js b/externs/js/missing.js
index aedd69f..d3e6d3c 100644
--- a/externs/js/missing.js
+++ b/externs/js/missing.js
@@ -217,6 +217,12 @@ Array.prototype.insertAt = function(index, element) {};
*/
Array.prototype.removeAt = function(index) {};
+/**
+ * @param {Object} fieldName The field name or array of field names.
+ * @param {Object=} opt_options The bitmask of options.
+ * @return {Array} The sorted Array.
+ */
+Array.prototype.sortOn = function(fieldName, opt_options) {};
/**
[09/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - typo
Posted by cd...@apache.org.
typo
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/80e344aa
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/80e344aa
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/80e344aa
Branch: refs/heads/feature/maven-migration
Commit: 80e344aa53b4c28852d1e1c4e1bbb10f53039415
Parents: a5b8b0f
Author: Alex Harui <ah...@apache.org>
Authored: Thu Mar 24 21:57:27 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Mar 24 21:57:38 2016 -0700
----------------------------------------------------------------------
compiler/src/org/apache/flex/compiler/config/Configuration.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/80e344aa/compiler/src/org/apache/flex/compiler/config/Configuration.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/config/Configuration.java b/compiler/src/org/apache/flex/compiler/config/Configuration.java
index 6516464..d7f9465 100644
--- a/compiler/src/org/apache/flex/compiler/config/Configuration.java
+++ b/compiler/src/org/apache/flex/compiler/config/Configuration.java
@@ -2334,7 +2334,7 @@ public class Configuration
}
@Config
- @Mapping({ "compiler", "allow-subclass-override" })
+ @Mapping({ "compiler", "allow-subclass-overrides" })
@FlexOnly
public void setCompilerAllowSubclassOverrides(ConfigurationValue cv, Boolean allow) throws ConfigurationException
{
[10/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - Merge branches 'develop' and
'feature/maven-migration' of
https://git-wip-us.apache.org/repos/asf/flex-falcon into
feature/maven-migration
Posted by cd...@apache.org.
Merge branches 'develop' and 'feature/maven-migration' of https://git-wip-us.apache.org/repos/asf/flex-falcon into feature/maven-migration
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/36182c97
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/36182c97
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/36182c97
Branch: refs/heads/feature/maven-migration
Commit: 36182c97fa0972b8254bcf5bc40bebdcb8787c12
Parents: a28717c 80e344a
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sun Mar 27 11:14:07 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sun Mar 27 11:14:07 2016 +0200
----------------------------------------------------------------------
.../codegen/externals/ExternalsTestUtils.java | 3 +
.../codegen/externals/TestExternJQuery.java | 4 +-
.../externals/TestExternalsJSCompile.java | 16 +-
.../js/flexjs/TestFlexJSGlobalClasses.java | 18 ++
.../codegen/js/flexjs/TestFlexJSProject.java | 74 ++++++-
.../codegen/js/vf2js/TestVF2JSFile.java | 14 +-
.../mxml/flexjs/TestFlexJSMXMLApplication.java | 204 ++++++++++++++++++-
.../mxml/vf2js/TestVF2JSMXMLApplication.java | 8 +-
.../compiler/internal/test/FlexJSTestBase.java | 6 +-
.../compiler/internal/test/VF2JSTestBase.java | 8 +-
.../flexjs/projects/bad_overrides/Test.as | 43 ++++
.../projects/bad_overrides/Test_result.js | 94 +++++++++
.../flexjs/projects/bad_overrides/classes/A.as | 41 ++++
.../projects/bad_overrides/classes/A_result.js | 92 +++++++++
.../flexjs/projects/bad_overrides/classes/B.as | 25 +++
.../projects/bad_overrides/classes/B_result.js | 69 +++++++
.../flexjs/projects/bad_overrides/classes/C.as | 25 +++
.../projects/bad_overrides/classes/C_result.js | 69 +++++++
.../projects/bad_overrides/interfaces/IA.as | 28 +++
.../bad_overrides/interfaces/IA_result.js | 69 +++++++
.../projects/bad_overrides/interfaces/IB.as | 22 ++
.../bad_overrides/interfaces/IB_result.js | 62 ++++++
.../projects/bad_overrides/interfaces/IC.as | 22 ++
.../bad_overrides/interfaces/IC_result.js | 62 ++++++
.../flexjs/projects/overrides/Test.as | 43 ++++
.../flexjs/projects/overrides/Test_result.js | 94 +++++++++
.../flexjs/projects/overrides/classes/A.as | 41 ++++
.../projects/overrides/classes/A_result.js | 92 +++++++++
.../flexjs/projects/overrides/classes/B.as | 25 +++
.../projects/overrides/classes/B_result.js | 69 +++++++
.../flexjs/projects/overrides/classes/C.as | 25 +++
.../projects/overrides/classes/C_result.js | 74 +++++++
.../flexjs/projects/overrides/interfaces/IA.as | 28 +++
.../projects/overrides/interfaces/IA_result.js | 69 +++++++
.../flexjs/projects/overrides/interfaces/IB.as | 22 ++
.../projects/overrides/interfaces/IB_result.js | 62 ++++++
.../flexjs/projects/overrides/interfaces/IC.as | 22 ++
.../projects/overrides/interfaces/IC_result.js | 65 ++++++
.../codegen/js/jx/FunctionCallEmitter.java | 23 +++
.../codegen/js/jx/MemberAccessEmitter.java | 5 -
.../codegen/mxml/flexjs/MXMLFlexJSEmitter.java | 38 +++-
.../internal/projects/FlexJSProject.java | 1 -
.../org/apache/flex/utils/AntTestAdapter.java | 2 +-
.../org/apache/flex/compiler/clients/ASC.java | 9 +-
.../flex/compiler/config/Configuration.java | 18 ++
.../internal/config/TargetSettings.java | 6 +
.../definitions/FunctionDefinition.java | 2 +-
.../internal/projects/CompilerProject.java | 5 +
.../compiler/internal/projects/FlexProject.java | 13 ++
.../compiler/projects/ICompilerProject.java | 7 +
.../flex/compiler/targets/ITargetSettings.java | 6 +
env-template.properties | 4 +
externs/js/missing.js | 24 ++-
53 files changed, 1921 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
[11/11] git commit: [flex-falcon]
[refs/heads/feature/maven-migration] - - Added the animal-sniffer plugin to
ensure API compatibility with JDK 1.6 - Added some cleanup commands
Posted by cd...@apache.org.
- Added the animal-sniffer plugin to ensure API compatibility with JDK 1.6
- Added some cleanup commands
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/0c1b60ef
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/0c1b60ef
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/0c1b60ef
Branch: refs/heads/feature/maven-migration
Commit: 0c1b60efaa0fa4b5ea93a326f0445564858d9053
Parents: 36182c9
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sun Mar 27 16:13:07 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sun Mar 27 16:13:07 2016 +0200
----------------------------------------------------------------------
compiler.jx/pom.xml | 11 +++++------
migrate-to-maven.sh | 51 ++++++++++++++++++++++++++++++++++++++++++------
pom.xml | 47 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 97 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/0c1b60ef/compiler.jx/pom.xml
----------------------------------------------------------------------
diff --git a/compiler.jx/pom.xml b/compiler.jx/pom.xml
index cb08e4f..e9e10a4 100644
--- a/compiler.jx/pom.xml
+++ b/compiler.jx/pom.xml
@@ -66,17 +66,16 @@
<exclude>org/apache/flex/compiler/internal/codegen/js/flexjs/**/Test*.java</exclude>
</includes>
<excludes>
- <!-- Tests with errors -->
+ <!-- Use externs -->
<exclude>**/TestExternChrome.java</exclude>
<exclude>**/TestExternJasmine.java</exclude>
+ <exclude>**/TestExternJQuery.java</exclude>
+ <exclude>**/TestExternES3.java</exclude>
<exclude>**/TestExternalsJSCompile.java</exclude>
- <exclude>**/TestFlexJSFile.java</exclude>
<exclude>**/TestFlexJSProject.java</exclude>
-
- <!-- Failing tests -->
- <exclude>**/TestExternES3.java</exclude>
- <exclude>**/TestFlexJSClass.java</exclude>
+ <exclude>**/TestFlexJSMXMLApplication.java</exclude>
<exclude>**/TestFlexJSEmiter.java</exclude>
+ <exclude>**/TestFlexJSClass.java</exclude>
<exclude>**/TestFlexJSExpressions.java</exclude>
</excludes>
</configuration>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/0c1b60ef/migrate-to-maven.sh
----------------------------------------------------------------------
diff --git a/migrate-to-maven.sh b/migrate-to-maven.sh
index bb41a85..73258aa 100755
--- a/migrate-to-maven.sh
+++ b/migrate-to-maven.sh
@@ -35,6 +35,11 @@ git mv compiler/src/org/apache/flex/compiler/internal/as/codegen/IASNodeAdapter.
# Convert the compiler project itself
mkdir -p compiler/src/main/java
mkdir -p compiler/src/main/resources
+# Move the scripts
+mkdir -p compiler/src/assembly/scripts
+git mv compiler/commandline/* compiler/src/assembly/scripts
+rm -r compiler/commandline
+
mkdir -p compiler/src/main/jflex/org/apache/flex/compiler/internal/parsing/as
git mv compiler/src/org/apache/flex/compiler/internal/parsing/as/*.lex compiler/src/main/jflex/org/apache/flex/compiler/internal/parsing/as
git mv compiler/src/org/apache/flex/compiler/internal/parsing/as/skeleton.* compiler/src/main/jflex/org/apache/flex/compiler/internal/parsing/as
@@ -73,19 +78,37 @@ git mv compiler.tests/feature-tests/as compiler/src/test/java
git mv compiler.tests/feature-tests/mxml compiler/src/test/java
git mv compiler.tests/feature-tests/properties compiler/src/test/java
git mv compiler.tests/functional-tests/f compiler/src/test/java
+
# Clean up
-git rm -r generated
-git rm -r lib
-git rm -r results
-git rm -r temp
-git rm -r tools
-git rm -r utils
+rm -r compiler/.settings
+rm -r compiler/lib
+git rm -r compiler/results
+git rm -r compiler/temp
+git rm -r compiler/tools
+rm -r compiler/utils
+rm compiler/.classpath
+rm compiler/.project
+git rm compiler/build.xml
+git rm compiler/downloads.xml
+git rm compiler/flexTasks.tasks
+git rm compiler.tests
+
+#############################################
+## Remove the compiler.js module
+#############################################
+
+git rm compiler.js
#############################################
## Convert the compiler.jx module
#############################################
mkdir -p compiler.jx/src/main/java
mkdir -p compiler.jx/src/main/resources
+# Move the scripts
+mkdir -p compiler.jx/src/assembly/scripts
+git mv compiler.jx/bin/* compiler.jx/src/assembly/scripts
+rm compiler.jx/bin
+
git mv compiler.jx/src/META-INF compiler.jx/src/main/resources
git mv compiler.jx/src/com compiler.jx/src/main/java
git mv compiler.jx/src/org compiler.jx/src/main/java
@@ -98,6 +121,17 @@ git rm -r compiler.jx.tests/src/org compiler.jx/src/test/java/org/apache/flex/ut
mkdir -p compiler.jx/src/test/resources
git mv compiler.jx.tests/test-files/* compiler.jx/src/test/resources
+# Clean up
+rm -r compiler.jx/in
+rm -r compiler.jx/lib
+git rm -r compiler.jx/templ
+rm compiler.jx/.classpath
+rm compiler.jx/.project
+git rm -r compiler.jx/build.xml
+git rm -r compiler.jx/downloads.xml
+git rm -r compiler.jx/local-template.properties
+git rm -r compiler.jx.tests
+
#############################################
## Convert the externs
#############################################
@@ -138,3 +172,8 @@ mkdir -p externs/node/src/main/javascript
git mv externs/node/externs/* externs/node/src/main/javascript
rm -r externs/node/externs
+# clean up
+git rm -r generated
+git rm -r installer.properties
+rm -r swfutils
+git rm -r utils
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/0c1b60ef/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f6e6b90..36739bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -212,6 +212,7 @@
</configuration>
</plugin>
+ <!-- Make the failsafe execute all integration-tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
@@ -236,6 +237,52 @@
</systemPropertyVariables>
</configuration>
</plugin>
+
+ <!-- Plugin to detect problems with JDK incompatibilities -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-maven-plugin</artifactId>
+ <version>1.15</version>
+ <executions>
+ <execution>
+ <id>check-jdk-1.6</id>
+ <phase>test</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <signature>
+ <groupId>org.codehaus.mojo.signature</groupId>
+ <artifactId>java16</artifactId>
+ <version>1.1</version>
+ </signature>
+ </configuration>
+ </plugin>
+
+ <!-- Configure the assembly -->
+ <!--plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>assemble-sources-releases</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/binary-distribution-zip.xml</descriptor>
+ <descriptor>src/assembly/binary-distribution-gz.xml</descriptor>
+ <descriptor>src/assembly/source-distribution-zip.xml</descriptor>
+ <descriptor>src/assembly/source-distribution-gz.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin-->
</plugins>
</build>