-
Notifications
You must be signed in to change notification settings - Fork 790
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
FS0192 "destRefTupleTy: not a reference tuple type" #9903
Comments
Related: #9 (fixed), and #250 (the fix) and #9702, #4825, #6528, #9296 (all related, same error, other cause) and a bunch of others. @cartermp, if I search for that (internal) error, there are quite some reports. Maybe we should prioritize them? I'm not quite sure what causes this, or I could start working on it myself. Edit: it appears that some may have been fixed, but that issues have remained open. |
Pretty much all of these reports are distinct from one another. This is another such case 😄 |
This seems to only happen if the extension method is recursive. An easy workaround is to define a recursive function outside of the extension instead. E.g.
|
True, it's an easy workaround if you know where the affected code is; however, error reporting gives no clue, and there can be many recursive type extensions in a codebase. If there is some sort of internal compiler service error, then it may be worth looking into whether it is still possible to capture and report file context. |
Smaller repro:
|
Hello, Is this fix available in Visual Studio 19.7.3? It's not clear from the release notes |
This fix will be in the VS 16.8 release. |
I just tested @dsyme's smaller repro on VS 16.8.0 Preview 3.0 and still got the "destRefTupleTy: not a reference tuple type" error. Will the fix make it to the next preview? |
Not sure. Bits flow into previews when they flow in. But it will be in the release. |
Hi, |
@chaami if you're using the .NET SDK, the latest RC has all fixes that will be in the VS 16.8 release. Unfortunately, .NET and VS have orthogonal ship schedules so there isn't much coherence between the two on what gets what aside from the final release. That said, later this month there should be another preview that likely has the fix. |
Hi @cartermp , |
Using the supplied repro this no longer reproduces neither from the command line nor from an internal build of VS that represents something that has yet to ship. SKU of VS shouldn't matter for this. Do you have a repro you can share? |
Using the supplied zip fails on Visual Studio Community 16.7.6 but succeeds through the command line ( |
@chaami I would expect it to fail in 16.7, yes, and succeed with the latest preview of the .NET SDK. Switching TFM shouldn't have anything to do with this issue, it was a compiler bug that was shipped in the latest .NET 5 RC SDK, and will be available in the VS 16.8 release. |
Discriminated union with type extension triggers strange error message without syntactic context (no file name or usable line number) nor helpful information about what the issue actually is. The error message looks like an internal F# compiler error message.
Repro steps
Steps required to reproduce the problem:
FS0192_destRefTupleTy_not_a_reference_tuple_type.zip
Expected behavior
Expected more meaningful error message or actionable information about what to do or what not to do.
Actual behavior
Somewhat esoteric error message.
I should perhaps note that Visual Studio crashed twice while trimming code to create a minimum repro. The crash was triggered by a compile of the project. Not able to recreate that anymore though.
Known workarounds
Related information
The text was updated successfully, but these errors were encountered: