@Override
public boolean isIdentical(GoPsiType goType) {
if (!(goType instanceof GoPsiTypeChannel))
return false;
GoPsiTypeChannel otherChannel = (GoPsiTypeChannel) goType;
GoPsiType elementType = this.getElementType();
if (elementType == null)
return false;
GoTypeChannel.ChannelType chanType = this.getChannelType();
GoTypeChannel.ChannelType otherChanType = otherChannel.getChannelType();
return (chanType == otherChanType || chanType == GoTypeChannel.ChannelType.Bidirectional) &&
elementType.isIdentical(otherChannel.getElementType());
}