ExE-Boss opened a new issue #3466:
URL: https://github.com/apache/netbeans/issues/3466
### Apache NetBeans version
Latest release
### What happened
**Convert Explicit Type to Var** is reported for method references and
lambda expressions, e.g.:
```java
final Consumer<String> println = System.out::println;
```
But it's invalid to replace the above with:
```java
final var println = System.out::println;
```
which results in the compile error:
```
error: cannot infer type for local variable println
final var println = System.out::println;
^
(method reference needs an explicit target-type)
```
### How to reproduce
_No response_
### Did this work correctly in an earlier version?
- [ ] This used to work!
### Operating System
Windows 10
### JDK
OpenJDK Runtime Environment [Temurin](https://adoptium.net/)-17.0.1+12
(build 17.0.1+12)
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow the Apache Software Foundation's [Code of
Conduct](https://www.apache.org/foundation/policies/conduct.html)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists