-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inline
is not ignore as it may should be.
#128
Comments
This is an annoying, but expected phenomenon. When the F# compiler inlines a method, it compiles the code almost as if the inlined method had been copied into place in the call site at the source level. The "almost" is because even a multi-statement function being inlined (e.g. the built-in In particular, there is no debug information pointing at the original location of the method; just the one very large statement each time it is invoked. The workround, if you want that line to go green, is to do something like
assuming coverage testing on the debug build. |
This is a functional workaround I may use but I don't really like that an external tool alter like this the way I write a function. I will think about it. Thank you for the answer. I will close this issue for now. Have a nice weekend if it is the weekend wherever you are. :) |
The real fix would require an F# compiler enhancement that would bring in the debug sequence point information from the source assembly where available (or, possibly, where available from the same assembly), which would also enable what is not currently possible -- stepping through an inlined function in the debugger. |
Related -- dotnet/fsharp#9176 |
Hello,
I may forgot something but I dont know why inline function is seen as not covered. Well, it is technically true because the function is inlined by the compiler. But this should not be seen as red, shouldn't it?
with inline
without inline
Cheers,
The text was updated successfully, but these errors were encountered: