@b4n, the highlighted text was copied from part way down
[this](https://docs.oracle.com/en/java/javase/22/language/local-variable-type-inference.html)
page (about para 4). Making it a predefined typename is how "contextuality"
is implemented I guess, as it is a typename it makes `var i = 10;` be a
declaration, and act like C++ `auto i = 10;` but where a typename is not
expected its a variable name eg `var var = "var";` :grin:
As the rest of the sentence I copied says `which means that existing code that
uses var as a variable, method, or package name is not affected.`
So with the contextless lexer implementation those cases can't be disambiguated
from `var` as a type, so both are correct, pick one for highlighting. [no right
answer]
> There is on line 3 😉
Ooops, hidden by the { [end excuse]
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3854#issuecomment-2074519916
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3854/[email protected]>