public void AddStateVarToDynamicType(string varName, ContractDefinition dynamicType, VariableDeclaration varDecl) { Debug.Assert(varDecl.StateVariable); if (!StateVarNameResolutionMap.ContainsKey(varName)) { StateVarNameResolutionMap[varName] = new Dictionary <ContractDefinition, VariableDeclaration>(); } // may potentially override the previous value due to inheritance StateVarNameResolutionMap[varName][dynamicType] = varDecl; }
public bool HasStateVarName(string varName) { return(StateVarNameResolutionMap.ContainsKey(varName)); }
public bool HasStateVar(string varName, ContractDefinition dynamicType) { return(StateVarNameResolutionMap.ContainsKey(varName) && StateVarNameResolutionMap[varName].ContainsKey(dynamicType)); }