'internal' keyword on actionscript class being marked as an error?

In the file Foobar.ac  the code looks like :


package bar
{
public class Foobar {
...
..
..
} //end of class
}//end of package


use namespace mx.internal; // not sure if this is significant.



internal class Foobar2 {
...
..
..
}

The 'internal' keyword as shown above is being flagged (red underline and will not compile) as an error in IntelliJ 8.1.3, Build 9886. This does not happen when the same Foobar.ac file is loaded into eclipse or FlexBuilder. The documentation at Adobe seems to indicate that this is a perfectly legal construct and infact compiles under Eclipse, Flexbuilder and Maven.  Check out the doc at http://livedocs.adobe.com/flex/3/html/help.html?content=basic_as_2.html which says

"The class definition of your component must be prefixed by the public keyword, or it cannot be used as an MXML tag. A file that contains a class definition can have one, and only one, public class definition, although it can have additional internal class definitions. Place any internal class definitions at the bottom of your source file below the closing curly brace of the package definition.
In a single ActionScript file, you can define only one class in the package. To define more than one class in a file, define the additional classes outside of the package body."

Has anyone else run into this before?

Cheers

Cam

1 comment
Comment actions Permalink

Thank you, backported http://youtrack.jetbrains.net/issue/IDEADEV-39761

Cam Roe wrote:

In the file Foobar.ac  the code looks like :


package bar
{
public class Foobar {
..
.
.
} //end of class
}//end of package


use namespace mx.internal; // not sure if this is significant.



internal class Foobar2 {
..
.
.
}

The 'internal' keyword as shown above is being flagged (red underline and will not compile) as an error in IntelliJ 8.1.3, Build 9886. This does not happen when the same Foobar.ac file is loaded into eclipse or FlexBuilder. The documentation at Adobe seems to indicate that this is a perfectly legal construct and infact compiles under Eclipse, Flexbuilder and Maven.  Check out the doc at http://livedocs.adobe.com/flex/3/html/help.html?content=basic_as_2.html which says

"The class definition of your component must be prefixed by the public keyword, or it cannot be used as an MXML tag. A file that contains a class definition can have one, and only one, public class definition, although it can have additional internal class definitions. Place any internal class definitions at the bottom of your source file below the closing curly brace of the package definition.
In a single ActionScript file, you can define only one class in the package. To define more than one class in a file, define the additional classes outside of the package body."

Has anyone else run into this before?

Cheers

Cam

---
Original message URL: http://www.jetbrains.net/devnet/message/5247224#5247224



--
Best regards,
   Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.