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 :)

Thanks

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.

Thanks,
Manoj

-----"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

Hi,

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...

Greetings,
Stefan

--
Stefan Reich
BotCompany.de // AGI in the making

_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jdt-dev



--
Stefan Reich
BotCompany.de // Java-based operating systems

Back to the top