Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: indexed export format needs inline bodies for map keys #26341
We currently don't export inline bodies for map key types. I thought this was unnecessary since map indexing expressions only yield the map element type, but I forgot that range-based for loops can be used to extract the map key type.
This wasn't a problem for the old binary export format, because if an inline body was unexpectedly missing from the export data, the compiler couldn't distinguish that from it just not being inlineable. But with the indexed export format, we separately track whether a method is inlineable from whether it's (re)exported by any particular package.