Virtual interface resolution cannot find a matching instance of interface

In reply to wpiman:

wpiman,

You might want to think about putting the code for your agents in separate packages. See Package/Organization | Verification Academy. You can compile all your packages all the time, but only the packages that get imported will be analyzed for this consistency.

The problem with virtual interfaces is that references via virtual interfaces treat the interface as if it were a class type. The compiler needs the type information in order to generate code around those references, and it doesn’t know without very expensive analysis that the code is unreachable. The switch says “I know what I’m doing” and you are one your own for any weird behaviors that come out of it.