Replies: 1 comment 2 replies
-
Personally, I don't see much value in automatically making |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are situations on the boundary between static and dynamic dispatch, where a particular member is statically known to be accessed, but the access is dynamic, such as when invoking members with
dynamic
arguments:Changing
var c
todynamic c
has absolutely no effect on the generated CIL code, but the compiler is aware of the dependency, and will issue errors if the members inC
are removed.I think that in situations like this one, where the compiler is aware of the dependency but cannot express it in code, it should add the
DynamicDependency
attribute to the method that uses the members, preventing potential issues as a result of trimming or other analysis:Beta Was this translation helpful? Give feedback.
All reactions