Implement interface breaks code in large script
I'm working on a large script and was creating a new class which would implement an interface. When I had LINQPad implement the interface, it breaks the code in the following class in the script.
line 985 here happens to be the end of the "extensions" region
I tried to replicate in a smaller script here but it doesn't happen the same. It seems like the code refactoring is happening on the wrong "version" of the current code.
I tried reopening the same script in a fresh session and it still occurs.
LINQPad 6.6.6 beta x64
.Net Core 3.1
I'll also bring attention to this one as well as it also applies here.
https://forum.linqpad.net/discussion/1725/using-autocomplete-changes-the-indentation-level#latest
Comments
Can you share a sample query where this occurs in LINQPad 6?
I'll see if I can replicate this in another script I don't mind sharing, if not I'll probably send you this script as is.
It looks like it is related to the length of the script and where in the script the autocomplete takes place. In the script below, if you implement toward the top of the script, it works fine, but if you implement toward the end of the script, it will have this error.
http://share.linqpad.net/orsrne.linq
I've uploaded new betas for LINQPad 5 and 6 which should solve this problem in most scenarios. Let me know how you get along.