Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-dev] Using var keyword with Java 8 target

Hmm, could you point me to where in the compiler the "var" keyword is handled? I'm happy to patch things myself :)


On Mon, 5 Apr 2021 at 05:55, Manoj Palat <manoj.palat@xxxxxxxxxx> wrote:
Hi Stefan,
You are right that var is at compiler level since the type is inferred by the compiler.
However, since var was introduced at Java 10 as per the language specification, we cannot provide var at Java 8 level.


-----"jdt-dev" <jdt-dev-bounces@xxxxxxxxxxx> wrote: -----
To: jdt-dev@xxxxxxxxxxx
From: Stefan Reich via jdt-dev
Sent by: "jdt-dev"
Date: 04/04/2021 11:41PM
Cc: Stefan Reich <stefan.reich.maker.of.eye@xxxxxxxxxxxxxx>
Subject: [EXTERNAL] [jdt-dev] Using var keyword with Java 8 target


the "var" keyword is solely implemented on the compiler level, yes? So then, is it possibly to give an ECJ compiler flag that allows me to use the var keyword in code compiled for Java 8?

I'd really like to keep Java 8 compatibility, but the var keyword is so incredibly convenient...


Stefan Reich // AGI in the making

jdt-dev mailing list
To unsubscribe from this list, visit

Stefan Reich // Java-based operating systems

Back to the top