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
When MethodByName is used with a static string, we can instead use Interface and a type assertion. This has the benefit of not disabling the linker's dead code elimination.
Tagged needs-decision because there's the potential for this to be noisy. There are various reasons why the user might not care, maybe they're already importing another library that uses MethodByName.
We only used it with static method names,
so we can use type assertions to reach those methods instead.
This is easier as we avoid more reflection,
and does not throw off the linker's dead code elimination.
See dominikh/go-tools#1348.
mvdan
added a commit
to mvdan/sh
that referenced
this issue
Jan 7, 2023
We only used it with static method names,
so we can use type assertions to reach those methods instead.
This is easier as we avoid more reflection,
and does not throw off the linker's dead code elimination.
See dominikh/go-tools#1348.
When MethodByName is used with a static string, we can instead use Interface and a type assertion. This has the benefit of not disabling the linker's dead code elimination.
Tagged needs-decision because there's the potential for this to be noisy. There are various reasons why the user might not care, maybe they're already importing another library that uses MethodByName.
Via mvdan, via google/starlark-go#444
The text was updated successfully, but these errors were encountered: