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
to (*BinaryInfo).findTypeExpr would allow evaluating arbitrary map types. I can't think of a scenario where this would matter, but it also seems a bit odd that evaluating a map[Key]Value expression will fail if that specific type does not exist in the DWARF section.
The text was updated successfully, but these errors were encountered:
Why would we do this? To have a better error when doing type assertions to map types? If there is a way to successfully use this constructed type (for example by using typecasts) it will be impossible to do anything with it because the Type field needs to be a StructType with an actual description of the hashtable's layout (the typ.Type = typ line is wrong).
It was just something that I ran into while I was working on #3691. As I said, I can't think of a scenario where this would matter. I'm fine with closing this, unless you think it's worth the added complexity to return a better error; e.g. if findType returns an error and the expression is a MapType, return "I can't make that map" or something instead of "I can't find that type".
Adding something like this:
to
(*BinaryInfo).findTypeExpr
would allow evaluating arbitrary map types. I can't think of a scenario where this would matter, but it also seems a bit odd that evaluating amap[Key]Value
expression will fail if that specific type does not exist in the DWARF section.The text was updated successfully, but these errors were encountered: