Declaring the package and class together has been deprecated since ActionScript 3. The package definition should be declared outside of the class definition even if the old syntax is still supported.

Noncompliant Code Example

class P.A {...}

Compliant Solution

package P {
    class A {...}
}