question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Internal error when typing in VS

See original GitHub issue

Repro steps

type D =
    | A
    | B

    member

Expected behavior

No issues.

Actual behavior

internal error: GetInstanceMemberThisVariable: instance member did not have expected internal form
System.Exception: GetInstanceMemberThisVariable: instance member did not have expected internal form   at
FSharp.Compiler.CheckExpressions.firstArg@3929.Invoke(Expr e) in C:\code\fsharp\src\Compiler\Checking\CheckExpressions.fs:line 3933    at
FSharp.Compiler.CheckExpressions.TcLetrecBinding(TcFileState cenv, TcEnv envRec, Range scopem, FSharpList`1 extraGeneralizableTypars, FSharpOption`1 reqdThisValTyOpt, TcEnv envNonRec, FSharpList`1 generalizedRecBinds, FSharpList`1 preGeneralizationRecBinds, UnscopedTyparEnv tpenv, FSharpMap`2 uncheckedRecBindsTable, PreCheckingRecursiveBinding rbind) in C:\code\fsharp\src\Compiler\Checking\CheckExpressions.fs:line 11665
....

Related information

Provide any related information (optional):

  • main at f9e66b494f98560493e537b4498c7a9dd8ffed4f

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
keramscommented, Jun 21, 2023

I’ll keep posting what I run into

``
`
1reaction
auduchinokcommented, Jun 20, 2023

Likely related to recovery changes.

cc @auduchinok

I think we haven’t inserted those yet.

Yes, it’s likely the cause. The type checker will require small adjustments for the cases like these, like it was done here, and I was going to do a throughout testing for all these unfinished constructs after the initial parsing work is mostly done. I really hope that I’m very close to that. 🙂

Now I think I should look there a bit sooner, so I’ll try to look into it tomorrow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio 2019: Error in "locals" panel during debugging
1. close all vs, enter C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\16.0_xxx\Settings\CurrentSettings.vssettings 2. then use the NotePad ...
Read more >
An internal error occured while type checking file #4552
An internal error occurred while type checking file "c:\Users\me\OneDrive\Documents\main.py": TypeError: Cannot read properties of undefined ...
Read more >
An Internal Error Occurred when changing work item type
When I try to change a work item to another custom type, I get TF400898: An Internal Error Occurred when I try to...
Read more >
Why when I used the Visual Studio Community 2019 C# to ...
Please go to Tools > Options > Debugging > General > uncheck "Enable Edit and Continue". Then, restart your VS and check if...
Read more >
InternalError - JavaScript - MDN Web Docs - Mozilla
The InternalError object indicates an error that occurred internally in the JavaScript engine. Example cases are mostly when something is too large, e.g.:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found