[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Enums in interface dont work ???

Status
Not open for further replies.
S

Simon L. Prinsloo

Guest
Evan Bleicher Tech Support logged OCTA-18481 for this. Laura Stern Correct. The compiler simply validate things in the wrong order. The problem is not limited to missing USING, but also occurs when the type name is misspelled, even for the primitive types. If the interface wants a CHARACTER and you define it as CAHRACTER you will get the problem the original poster experienced. In these cases, when you remove the IMPLEMENTS phrase, thus not implementing the interface, you will typically get error "Invalid datatype specified: . Specify a datatype such as 'character' or the name of a class. (5638)" (and error 196, though I believe 196 is redundant) on the relevant line. As soon as you have the IMPLEMENTS phrase, however, you will be pointed to the end of the file and receive either of: - Interface ' ' requires method ' ' to be implemented by class ''. The method is either missing or has mismatched parameters. (12942) - The data type of property ' ' does not match the same-named property in abstract class or interface ' '. (14753) That is confusing, since the implementation is / seems to be, correct. I've seen many people copy the method or property definitions from the interface to the class in their attempts to resolve that, of course with no success, since the actual problem is that the data type is not recognized. The compiler should first raise error 5638 and should not even try to check if the interface was implemented correctly before those are resolved, as it is simply not possible to do that as long as there are "invalid" data types present. I attached a very elementary but functional example and steps to reproduce in the support case (00527611).

Continue reading...
 
Status
Not open for further replies.
Top