Skip to content

8372170: Implementation for Enhanced Local Variable Declarations (Preview)#30556

Draft
biboudis wants to merge 1 commit intoopenjdk:masterfrom
biboudis:JDK-8372170
Draft

8372170: Implementation for Enhanced Local Variable Declarations (Preview)#30556
biboudis wants to merge 1 commit intoopenjdk:masterfrom
biboudis:JDK-8372170

Conversation

@biboudis
Copy link
Copy Markdown
Member

@biboudis biboudis commented Apr 2, 2026

This is the proposed patch for Enhanced Local Variable Declarations (Preview).


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires a JEP request to be targeted

Issues

  • JDK-8372170: Implementation for Enhanced Local Variable Declarations (Preview) (Sub-task - P4)
  • JDK-8357464: Enhanced Local Variable Declarations (Preview) (JEP)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30556/head:pull/30556
$ git checkout pull/30556

Update a local copy of the PR:
$ git checkout pull/30556
$ git pull https://git.openjdk.org/jdk.git pull/30556/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30556

View PR using the GUI difftool:
$ git pr show -t 30556

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30556.diff

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Apr 2, 2026

👋 Welcome back abimpoudis! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 2, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org compiler compiler-dev@openjdk.org labels Apr 2, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 2, 2026

@biboudis The following labels will be automatically applied to this pull request:

  • compiler
  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@biboudis
Copy link
Copy Markdown
Member Author

biboudis commented Apr 2, 2026

/jep JDK-8357464

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 2, 2026

@biboudis
This pull request will not be integrated until the JEP JDK-8357464 has been targeted.

@openjdk openjdk bot added the jep label Apr 2, 2026
JCExpression letBoundCandidateIdent = make.Ident(letBoundCandidate).setType(tempType);

// npe logic
JCIf ifNPEstatement = make.If(makeBinary(Tag.EQ, letBoundCandidateIdent, makeNull()).setType(syms.booleanType),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not attr.makeNullCheck? Redundant NPE type for Symtab too.

@@ -0,0 +1,129 @@
/*
* @test /nodynamiccopyright/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we should do nodynamiccopyright if this doesn't have a golden file output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org jep

Development

Successfully merging this pull request may close these issues.

2 participants