Store both interfaceID and objectID as key for interface registration callback.
Otherwise the implementation allows to register only one external model per one object in the single dialect.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I wouldn't call this a fix. Having the same class implement the interface for different objects actually sounds like a new functionality.
It's not the same class. In the test I've used template class TestExternalTestOpModel<ConcreteOp>, so for different objects we have different types. It might be different classes (for example, TestExternalTestOpModelForJ and TestExternalTestOpModelForH), it doesn't matter. But DialectRegistration uses base interface type ID as key, so it doesn't distinguish different model classes for the same interface.
Or in other words, current implementation doesn't allow to attach the same interface implementation to several objects from one dialect. And it doesn't matter if it is a single interface model for all objects or it is different model classes.