Kbase P131616: Referencing instance members in a static method causes error 14422
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/05/2008 |
|
Status: Unverified
FACT(s) (Environment):
OpenEdge 10.1C
All Supported Operating Systems
SYMPTOM(s):
Static method in class references instance member of the class
Compilation fails with error 14422
Static methods, property accessors, and constructors may only reference static members of the class. '<name>' is an instance member. (14422)
CAUSE:
Static methods can be invoked when there is no actual instance of the class so consequently there will be no class instance members available. As such references to instance members are disallowed from a static method and any such use will result in error 14422 during compilation.
FIX:
Modify the static method so that there are no references to instance members