-
Notifications
You must be signed in to change notification settings - Fork 518
Description
Hi, I recently stumbled upon a tiny issue with records that have only canonical constructor where the extension both:
- Successfully compiles (at least it doesn't show an error) code that uses the empty record constructor
- Forcing recompilation (incremental/full - doesn't make any difference) or rebuilding the project using extension also passes without any issues. Maven build fails though.
Given the above, the usage of the constructor without parameters doesn't popup in the problems tab.
A quick, and fairly simple, example can be reproduced with such record:
public record SimpleRecord(String fileName, Long lineNumber) {
}Here're a few screenshot from the call site:


Important to note, that, once I type e.g. new SimpleRecord("abc") (i.e. try to invoke a non-existent constructor for the first arg), the extension properly catches this error and highlights it in the "problems" tab. And also worth mentioning that adding an additional constructor solves the issue, so the empty constructor isn't being suggested in this case.
Not sure if this problem is caused by the extension itself or perhaps the JDTLS is the better place to raise the issue?
Also, I don't mind diving deeper into this issue and fix it.