You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In tcFunCall in typecheck.ts we have the following code that is meant to handle function calls to public getters:
} else {
if (def.vType instanceof UserDefinedTypeName) {
throw new Error(`NYI public getters for ${def.vType.print()}`);
}
// def.vType is defined, as you can't put a `var x,` in a contract state var definition.
return astVarToTypeNode(def);
}
The reason behind the check for a UserDefinedTypeName was that public getters for state vars that are structs return an array with some of the fields of the struct in solidity. Since we didn't want to model this at the time we decided to just not handle these cases.
However now we have code that computes the function type for public getters in solc-typed-ast. So we should fix this to support arbitrary public getters.
The text was updated successfully, but these errors were encountered:
In
tcFunCall
in typecheck.ts we have the following code that is meant to handle function calls to public getters:The reason behind the check for a UserDefinedTypeName was that public getters for state vars that are structs return an array with some of the fields of the struct in solidity. Since we didn't want to model this at the time we decided to just not handle these cases.
However now we have code that computes the function type for public getters in solc-typed-ast. So we should fix this to support arbitrary public getters.
The text was updated successfully, but these errors were encountered: