Yes I think I do understand now that it has to do with the generic type. In my mental model, the compiler would see the call to rand.int_max and validate that the import is used. After all, the compiler has to parse the code to verify it’s correct. I experimented and commented the import out and the compiler showed an error ("unknown ‘rand.max_int’)
In practice, unless the procedure gets instantiated then the compiler marks the import as not used. You can fix it by adding a test right in the file (this will instantiate the procedure with a concrete type and fix the problem) or add the dummy constant. If the line had included the generic T parameter that would have made more sense to me but that line just deal with concrete types j := rand.int_max(i + 1).
I am still new to the language and trying to get my feel of the land ![]()