Added new interface type as function call argument use case; added interface 
type as return type use case

Signed-off-by: Erik de Bruin <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/81121b95
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/81121b95
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/81121b95

Branch: refs/heads/develop
Commit: 81121b958bf01b4ea8f082b4702fa732457b63a8
Parents: eb28878
Author: Erik de Bruin <[email protected]>
Authored: Tue Nov 19 23:27:15 2013 +0100
Committer: Erik de Bruin <[email protected]>
Committed: Tue Nov 19 23:27:15 2013 +0100

----------------------------------------------------------------------
 .../test-files/flexjs/projects/interfaces/Test.as       |  8 ++++++++
 .../flexjs/projects/interfaces/Test_result.js           | 12 ++++++++++++
 2 files changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/81121b95/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test.as 
b/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test.as
index 4715e4c..6f251c9 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test.as
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test.as
@@ -2,6 +2,7 @@ package
 {
        import classes.A;
        import interfaces.IA;
+       import interfaces.IC;
        import interfaces.IE;
 
   public class Test extends A implements IA, IE
@@ -9,6 +10,13 @@ package
     public function Test()
     {
       super();
+      
+      var ia:IA = doSomething(IC) as IA
+    }
+    
+    public function doSomething(ic:IC):IC
+    {
+      return ic;
     }
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/81121b95/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
----------------------------------------------------------------------
diff --git 
a/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js 
b/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
index 189c30a..838e617 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
@@ -10,6 +10,7 @@ goog.provide('Test');
 
 goog.require('classes.A');
 goog.require('interfaces.IA');
+goog.require('interfaces.IC');
 goog.require('interfaces.IE');
 goog.require('org.apache.flex.utils.Language');
 
@@ -23,11 +24,22 @@ goog.require('org.apache.flex.utils.Language');
  */
 Test = function() {
   goog.base(this);
+  var /** @type {interfaces.IA} */ ia = 
org.apache.flex.utils.Language.as(this.doSomething(interfaces.IC), 
interfaces.IA);
 };
 goog.inherits(Test, classes.A);
 
 
 /**
+ * @expose
+ * @param {interfaces.IC} ic
+ * @return {interfaces.IC}
+ */
+Test.prototype.doSomething = function(ic) {
+  return ic;
+};
+
+
+/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}

Reply via email to