This release brings a lot of improvements regarding understanding of language features as well as bugfixes. Read the complete change log:
- Enhancement: Resolving calls to overloaded methods works much better now. In previous releases calls to overloaded methods were resolved to the first method that could be called with the given amount of arguments. Now OmniPascal takes the types of the arguments into account.
- Enhancement: Added support for methods with generic parameters and basic type inference
- Change: Types and methods appear with generic parameters in code completion
- Enhancement: When a code completion item with generic parameters is selected then the first generic parameter is marked and can be changed immediately. You can jump to the next generic parameter using tab
- Enhancement: Go-to-definition works (as good as possible) on method calls even when the amount of arguments doesn’t match the method’s signature
- Change: Go-to-definition performed on a parameter now jumps to the method’s declaration if possible instead of the implementation
- Enhancement: The parser is much more tolerant with FreePascal source files. It no longer crashes on keywords like generic, specialization and constref. Code completion works much better in FPC project.
- Enhancement: Code completion works on variables of a generic constrained type
- Enhancement: All classes implicitly inherit from System.TObject. All interfaces implicitly inherit from System.IInterface. In the past Calls to SomeObject.Free could only be resolved if the object’s class inherits implicitly from TObject.
- Enhancement: Code completion items have more different symbols now based on their kind
- Enhancement: Code completion items are ordered by relevance. In the past they were ordered alphabetically
- Change: Minor changes of symbols shown in the list of document sybols
- Enhancenment: Default namespaces are loaded from DPROJ files
- Enhancement: Values of scoped enums no longer appear in general code completion
- Enhancement: Generated tasks.json defines default tasks
- Bugfix: Automatic regeneration of build scripts didn’t work on Windows when the loaded project file changed
- Bugfix: Parser crashed when attempting to include a file with BOM header
- Bugfix: Go-to-definition of a symbol defined in an included file didn’t work
- Bugfix: Method calls like “read()” or “write()” are no longer displayed as keywords (at least when followed by round brackets)
- Bugfix: Calls to full qualified type members are now resolved properly
- Bugfix: When a pointer to a record type was declared before the record then the record’s members didn’t appear in code completion when triggered for a variable of the pointer type.
- Bugfix: Unit’s created via the lightbulb’s quickfix “Create new unit” were displayed with an error saying the unit name was wrong.
- Bugfix: Automatic interface implementation no longer adds include files to uses
- Bugfix: External methods didn’t appear in code completion
- Bugfix: OmniPascal did become very slow when huge files with a lot of overloaded methods (like System.SysUtils) were opened in VSCode
- Bugfix: Creating warnings for missing method implementations was very slow when a file had a lot of overloaded methods
- Bugfix: Indexed access on arrays returned from methods didn’t work
- Bugfix: Generic type parameters no longer appear in the list of document symbols
- Bugfix: Correct handling of visibility sections in record types
- Bugfix: Removed squiggly lines for unresolvable uses entries coming from an included files. They showed up as ghost erros in areas without matching text.
- Bugfix: Generic type parameters did show up in derived classes’ code completion
- Bugfix: The Result variable has now the correct type inside anonymous functions
- Improved performance for code completion and symbol resolving. Much better performance of multi threaded operations.