pragma solidity ^0.4.8;
library Library {
struct data {
unit val;
}
}
contract Array{
using Library for Library.data;
mapping(address => Library.data) clusterContract;
function addCluster(address id) returns(bool){
if (clusterContract[id] == address(0)) { // error occurs!
clusterContract[id] = list;
return true;
}
return false;
}
}
Following comparission if (clusterContract[id] == address(0))
gives the following error:
Operator == not compatible with types struct Library.data storage ref and address
E if(clusterContract[id] == address(0)) {...
How could I fix this error?