Hello!
I'm getting an exception on executing this code:
interface IItem {
bool opEquals(const IItem@ &in other) const;
}
class CItem : CBase, IItem {
bool opEquals(const IELCollectionItem@ &in other) const {
return @this is @other;
}
}
class CHolder : CBase {
private array<IItem@> m_arrItems;
int32 indexOf(const IItem@ hItem) const {
if(@hItem !is null) {
return m_arrItems.find(@hItem); // <<<<< An exception is here
} else {
return -1;
}
}
}
The text of exception is "Type 'IItem' does not have a matching opEquals or opCmp method"
So in m_arrItems I have CItem handles, but an array itself is created to hold IItem handles.
Compiler says that all is OK but on execution it fails.