expected private type "<type name>" defined at ...; found type "<type name>" defined at ...

6
Feb

Whenever you use a variable as a parameter to a function or procedure, it has to have the exact type of the corresponding function or procedure parameter. It may also have a sub-type in which case the compiler will automatically cast the subtype to the function or procedure type.

In all other cases you need to first transform the variable to the right type.

Although this can seem heavy, it is a really good way to avoid a lot of problems in the long run. Some people use Integer everywhere in their Ada software, it is a huge mistake since that way you lose the strong security offered by the Ada language.

0
Your rating: None