Closed zhemao closed 5 years ago
Seems like it's fundamentally impossible to differentiate two types having a common super type. I think in this specific case, the solution should be to define a subclass of SerialIO
for SerialAdapter
.
Resolved with new system.
We recently made changes to IceNet/SimpleNIC that changed the NICIO to be a subclass of SerialIO instead of StreamIO. Unfortunately, this caused midas widget mapping to break, because the SerialWidget was matching on SerialIO and all its subclasses, so it mistakenly matched the NICIO with the SerialWidget instead of the SimpleNICWidget. The solution was to change SimSerialIO's matchType function to explicitly return false for NICIO. I'm not sure how exactly this issue could be avoided in the future.