Please make inline vars usable for production – fix RSP-22158

Tuesday, July 23rd, 2019 | Dennis D. Spreen | Delphi 10.3 Rio, Delphi Programming

With the arrival of Delphi Rio 10.3 in October 2018 we saw “a very handy feature to the language, local inline variables with local scope and type inference” [Marco Tech Blog]. That was a feature “long overdue” [Comment section] and helped to push the Delphi language a little bit further. We’ve been very excited about this feature helping us writing code we’re all used to in other languages especially those used in for-loops:

or even more simplified to

As soon as the ISO/Web installer hit the download section we grabbed it, installed it… and have been hit hard in the face by CodeInsight (or whatever that feature is called) with not recognizing that simple code above as a valid Delphi code – which (not only) prevents working of not just the “Find declaration” but all of the source code productivity features as well. Ok, it was the first release of a new language feature, so well, we could wait for the next release which surely would fix that (there was an entry already in the Quality portal opened during the beta release…*sigh*).

Then came Delphi 10.3.1 in February 2019 – downloaded, installed, nothing changed, bug still there.

Then came Delphi 10.3.2 in July 2019 – downloaded, installed, nothing changed, bug still there.

The “fun” part is, while commenting both releases with the same request on fixing the RSP, all of the MVPs (including Marco) decided to delete (or not to publish) my comment about my request on fixing that bug. Not cool.

So here I am again, begging for a fix so we could use that new feature. Please fix (they are all the “same”):


RSP-22158 Editor marks inline variables as error
RSP-21643 Code Insight marks inline variables as error
RSP-21719 Error insight incorrectly marks inline var as error
RSP-21782 inline var error
RSP-21783 New language confuses ErrorInsight
RSP-21931 IDE does not recognize inline variable declarations
RSP-22989 local inline variables doesn’t work
RSP-23030 Inline Variables bug
RSP-23645 Error insight not working WITH inline variable declaration
RSP-23716 Error Insight with compiling code
RSP-24235 inline var structure errors

Thank you.

Tags: ,

3 Comments to Please make inline vars usable for production – fix RSP-22158

Richard K
July 23, 2019

Bothers me a lot, too

Larry Hengen
July 23, 2019

I agree that such issues need to be fixed, and likely should have been part of the initial implementation of in-line vars or at least documented as a known issue with the release(s).

This has been brought up by many individuals, and EMBT knows that CodeInsight, ErrorInsight, Refactoring and other code tools needs some significant re-work. If you look at the road map for 10.4 you will see that EMBT intends on implementing an LSP (Language Server Protocol) for Delphi. C++ got one with the 10.3.2 release, but EMBT needs to implement their own for Object Pascal. It is a much anticipated release for these reasons alone.

Clinton Johnson
July 23, 2019

Error inside has been fundamentally broken since it was first introduced. Even when it can make sense of the syntax (and if you use a single $IF, you can pretty much forget it ever doing that) – it just slows things down. If you are lucky, it doesn’t just crash the IDE.

Turning it off is one of the first things I do as part of migrating my settings forward.

Will the LSP promised for future versions finally fix things? I have my doubts. The protocols certainly are not designed for speed and efficiency.

Turn it off, pretend it doesn’t exist. Problem solved as far as I am concerned.

Leave a comment

About Dennis D. Spreen

I'm an avid programmer working on a variety of platforms in a variety of languages with a wide technical interest.

Search

QR Code

Categories