Will Smith

Results 42 comments of Will Smith

That makes sense. Thank you for looking at it. Will be looking forward to the LLVM 18 update.

I also expect the warning to show as @auduchinok described. The error does seem correct, but the range could be more accurate.

This is a feature improvement to pattern matching by adding more warning checks. Be best to make a RFC on https://github.com/fsharp/fslang-design regarding it. There we should discuss it.

@greatim Thank you for reporting this. I am having trouble reproducing your issue. I created two libraries like you said and the code generation appears to be correct; it's not...

I think this might be an improvement, it seems reasonable; but I don't know the full intentions of why we do a direct cast rather than check.

This is actually quite easy to implement and it should not be a breaking change. We should make this change to follow C#.

We would also need to interop with C# by looking at the `IsUnmanagedAttribute` on the type argument and be able to emit it as well.

I have a PR for this: https://github.com/Microsoft/visualfsharp/pull/6064

@RikkiGibson had a test case for C#, and I tried in F# and we blew up :)