Usually this error shows up when declaring functions and goes away by adding "memory" next to the argument, but this time I can't get it to resolve. I'm trying to instantiate a struct that takes in two parameters:
struct Obj {
string where;
uint what;
}
function do() public {
obj=Obj("here",1);
}
the line with the new Obj triggers: TypeError: Data location must be "storage", "memory" or "calldata" for variable, but none was given.
I tried putting "memory" all over the place, after the first argument, after the second, after both, after the function, etc. Nothing seems to appease the compiler.
I'm using pragma solidity ^0.8.0;