Description of Error
You get this error when you try to use both a custom namespace and an access modifier (”public”, “private”, “protected” or “internal”) in a class, method or property definition. “Static”, “Dynamic” and “Final” are still ok.
Adobe’s Official Writeup
You can not use both an access specifier (such as private or public) and a namespace attribute on a definition.
(Adobe Error Reference)
Cause of the Error
You have a class, function or variable defined using both a custom namespace and an access specifier. The compiler won’t let you do this, since your namespace already has its own access specifier (either “internal” or “public”).
Solutions to the Error
Remove the access specifier from the problematic definition. If it’s critical that your item be marked internal, consider making the namespace internal – otherwise, consider not using a namespace. If your item must be either protected or private then it cannot use a custom namespace.
Other Articles About This Error
If you’ve read a useful writeup of this issue elsewhere on the internet, leave a comment and I’ll add it to this list.
Most Recent Comments