You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Piotr Zarzycki <pi...@gmail.com> on 2017/03/09 08:51:08 UTC
Re: git commit: [flex-falcon] [refs/heads/develop] - fix interface
override checking
Hi Alex,
I'm not sure what lately has changed in the compiler, but in MDL and Mobile
there are a lot of weard errors. Maven build passes, but it shouldn't.
Any thoughts on that?
Thanks,
Piotr
W dniu czwartek, 9 marca 2017 <ah...@apache.org> napisaĆ(a):
> Repository: flex-falcon
> Updated Branches:
> refs/heads/develop 6e14d6835 -> dad773a21
>
>
> fix interface override checking
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/dad773a2
> Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/dad773a2
> Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/dad773a2
>
> Branch: refs/heads/develop
> Commit: dad773a2193b5a80aee1e5a5f82d30b82ac19431
> Parents: 6e14d68
> Author: Alex Harui <aharui@apache.org <javascript:;>>
> Authored: Wed Mar 8 22:42:14 2017 -0800
> Committer: Alex Harui <aharui@apache.org <javascript:;>>
> Committed: Wed Mar 8 22:42:14 2017 -0800
>
> ----------------------------------------------------------------------
> .../semantics/MethodBodySemanticChecker.java | 7 +++
> .../src/test/java/as/ASInheritanceTests.java | 59 ++++++++++++++++++++
> 2 files changed, 66 insertions(+)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/
> dad773a2/compiler/src/main/java/org/apache/flex/compiler/
> internal/semantics/MethodBodySemanticChecker.java
> ----------------------------------------------------------------------
> diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/
> semantics/MethodBodySemanticChecker.java b/compiler/src/main/java/org/
> apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
> index 1b51727..3904823 100644
> --- a/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/
> MethodBodySemanticChecker.java
> +++ b/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/
> MethodBodySemanticChecker.java
> @@ -2799,7 +2799,14 @@ public class MethodBodySemanticChecker
> if( conflicts.size() > 0 )
> {
> for( IFunctionDefinition overriden : conflicts )
> + {
> + if ((overriden instanceof SetterDefinition &&
> + funcDef instanceof GetterDefinition) ||
> + (overriden instanceof GetterDefinition &&
> + funcDef instanceof SetterDefinition))
> + continue;
> addProblem(new InterfaceMethodOverrideProblem(iNode,
> funcDef.getBaseName(), overriden.getParent().getBaseName()));
> + }
> }
>
> }
>
> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/
> dad773a2/compiler/src/test/java/as/ASInheritanceTests.java
> ----------------------------------------------------------------------
> diff --git a/compiler/src/test/java/as/ASInheritanceTests.java
> b/compiler/src/test/java/as/ASInheritanceTests.java
> index 4d1d393..b5833e1 100644
> --- a/compiler/src/test/java/as/ASInheritanceTests.java
> +++ b/compiler/src/test/java/as/ASInheritanceTests.java
> @@ -83,4 +83,63 @@ public class ASInheritanceTests extends
> ASFeatureTestsBase{
>
> compileAndExpectErrors(source, false,false,false, null,"No
> default constructor found in base class A.\n");
> }
> +
> + @Test
> + public void InterfaceOverrideError()
> + {
> + // all tests can assume that flash.display.Sprite
> + // flash.system.System and flash.events.Event have been imported
> + String[] imports = new String[]
> + {
> + };
> + String[] declarations = new String[]
> + {
> + };
> + String[] testCode = new String[]
> + {
> +
> + };
> + String[] extra = new String[]
> + {
> + "interface A {",
> + "function get text():String;",
> + "}",
> + "interface B extends A {",
> + "function get text():String;",
> + "}"
> + };
> + String source = getAS(imports, declarations, testCode, extra);
> +
> + compileAndExpectErrors(source, false,false,false, null,"Cannot
> override an interface method. Method text conflicts with a method in base
> interface A.\n");
> + }
> +
> + @Test
> + public void InterfaceOverrideOK()
> + {
> + // all tests can assume that flash.display.Sprite
> + // flash.system.System and flash.events.Event have been imported
> + String[] imports = new String[]
> + {
> + };
> + String[] declarations = new String[]
> + {
> + };
> + String[] testCode = new String[]
> + {
> +
> + };
> + String[] extra = new String[]
> + {
> + "interface A {",
> + "function get text():String;",
> + "}",
> + "interface B extends A {",
> + "function set text(value:String):void;",
> + "}"
> + };
> + String source = getAS(imports, declarations, testCode, extra);
> +
> + compileAndRun(source);;
> + }
> +
> }
>
>
--
Greetings
Piotr Zarzycki
Flex/AIR/.NET Developer
mobile: +48 880 859 557
e-mail: piotrzarzycki21@gmail.com
skype: zarzycki10
LinkedIn: http://www.linkedin.com/piotrzarzycki
<https://pl.linkedin.com/in/piotr-zarzycki-92a53552>
Re: git commit: [flex-falcon] [refs/heads/develop] - fix interface
override checking
Posted by Alex Harui <ah...@adobe.com>.
OK, there is another thread about Maven discussing this. These errors are
because upstream SWCs failed because of the missing .pbj files.
-Alex
On 3/9/17, 10:49 AM, "piotrz" <pi...@gmail.com> wrote:
>Error example from build [1]
>
>[INFO] --- flexjs-maven-plugin:0.8.0-SNAPSHOT:compile-as
>(default-compile-as) @ Mobile ---
>[INFO] Executing COMPC in tool group Falcon with args:
>[-load-config=C:\Jenkins\workspace\flex-asjs
>(maven)\frameworks\projects\Mobile\target\compile-as-config.xml]
>Loading configuration: C:\Jenkins\workspace\flex-asjs
>(maven)\frameworks\projects\Mobile\target\compile-as-config.xml
>
>C:\Jenkins\workspace\flex-asjs
>(maven)\frameworks\projects\Mobile\src\main\flex\org\apache\cordova\Applic
>ation.as(22):
>col: 9 Warning: Definition org.apache.flex.core.Application could not be
>found.
>
> import org.apache.flex.core.Application;
> ^
>
>C:\Jenkins\workspace\flex-asjs
>(maven)\frameworks\projects\Mobile\src\main\flex\org\apache\cordova\Applic
>ation.as(33):
>col: 35 Error: The definition of base class Application was not found.
>
> public class Application extends org.apache.flex.core.Application
>implements IFlexInfo
>
>
>[1]
>http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs%20(maven)/161/conso
>le
>
>Piotr
>
>
>
>
>-----
>Apache Flex PMC
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/Re-git-commit-flex-fa
>lcon-refs-heads-develop-fix-interface-override-checking-tp60274p60303.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: git commit: [flex-falcon] [refs/heads/develop] - fix interface
override checking
Posted by piotrz <pi...@gmail.com>.
Error example from build [1]
[INFO] --- flexjs-maven-plugin:0.8.0-SNAPSHOT:compile-as
(default-compile-as) @ Mobile ---
[INFO] Executing COMPC in tool group Falcon with args:
[-load-config=C:\Jenkins\workspace\flex-asjs
(maven)\frameworks\projects\Mobile\target\compile-as-config.xml]
Loading configuration: C:\Jenkins\workspace\flex-asjs
(maven)\frameworks\projects\Mobile\target\compile-as-config.xml
C:\Jenkins\workspace\flex-asjs
(maven)\frameworks\projects\Mobile\src\main\flex\org\apache\cordova\Application.as(22):
col: 9 Warning: Definition org.apache.flex.core.Application could not be
found.
import org.apache.flex.core.Application;
^
C:\Jenkins\workspace\flex-asjs
(maven)\frameworks\projects\Mobile\src\main\flex\org\apache\cordova\Application.as(33):
col: 35 Error: The definition of base class Application was not found.
public class Application extends org.apache.flex.core.Application
implements IFlexInfo
[1]
http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs%20(maven)/161/console
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-git-commit-flex-falcon-refs-heads-develop-fix-interface-override-checking-tp60274p60303.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: git commit: [flex-falcon] [refs/heads/develop] - fix interface
override checking
Posted by Alex Harui <ah...@adobe.com>.
On 3/9/17, 12:51 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:
>Hi Alex,
>
>I'm not sure what lately has changed in the compiler, but in MDL and
>Mobile
>there are a lot of weard errors. Maven build passes, but it shouldn't.
>
>Any thoughts on that?
Hmm. I just ran the build in flex-asjs develop branch using the
flex-falcon develop branch and everything, including examples, compiled
cleanly.
What errors are you getting? Make sure you aren't using one of the "dual"
branches against a "develop" branch. It has to be both "dual" or both
"develop".
HTH,
-Alex