Closed marklam closed 6 years ago
Thanks for reporting @marklam - I was able to reproduce and am digging deeper into it.
@marklam turns out this is a limitation of certain inline functions (with statically resolved type parameters) not being dynamically invokable (in this case the float
function is the culprit). Since Unquote evaluation is based on reflection, I don't think it can be overcome. See https://stackoverflow.com/a/40853727/236255 for a little more insight.
You can, of course, avoid this issue by evaluating fsq 25uy
outside of a quotation:
let actual = fsq 25uy
test <@ actual = 625.0 @>
Thanks for taking the time to look into it. I was particularly interested in evaluating inline functions in the quotation to get coverage tools to mark inlined functions' definitions as covered, but I guess that won't work for SRTP functions.
The following test throws a NotSupportedException
produces