Closed mario-bucev closed 9 months ago
Are you saying that the position for a function f that is called from g and inlined will also be reported in g? Does this apply to user-defined functions as well?
If I'm understanding correctly, yes, the inlined body of f
will have its position set to the call site.
Note that inlined bodies are annotated as @DropVCs
(except for synthetic inlined functions since these are removed and as such cannot be checked independently).
In some cases, VCs positions could be incorrect when using inline functions. This is particularly the case for synthetic
copy
methods which are always inlined. For instance, in the following snippet, the VC generated formc.copy(x = y)
would incorrectly point at the definition ofMyClass
. This PR fixes this issue and the correct position is now reported.