You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
If a package A imports package B, and uses reflect.TypeOf on an unnamed struct type B.T (such as an alias), we don't want to record B.T's fields as "do not obfuscate". This is for the same reason that we don't if B.T is a named struct type: the detection only works for the package defining the type, as otherwise it's inconsistent. We failed to handle this case well, because we assumed all struct types would be under some named type. This is not the case for type aliases. Fortunately, struct fields are named, and as such they are objects. Check their package too, just like we do for named types. Fixes another build error when obfuscating the protobuf module. We add a simplified version of the example above as a test case, which originated from debugging the protobuf build failure. |
4 years ago | |
---|---|---|
.. | ||
bench-cache | 4 years ago | |
bench-nocache | 4 years ago | |
mod | 4 years ago | |
scripts | 4 years ago |