Skip to content

Preserve erased and instantiated lambda method types - #449

Open
CaelmBleidd wants to merge 1 commit into
neofrom
caelmbleidd/fix-jvm-lambda-bootstrap-types
Open

CaelmBleidd wants to merge 1 commit into
neofrom
caelmbleidd/fix-jvm-lambda-bootstrap-types

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

Typed lambda expressions currently exchange the erased SAM signature and the instantiated invocation signature. RawInstListBuilder stores bootstrap arguments in reverse class-file order, while the typed builder destructures them as forward order. For Predicate<Integer> p = Character::isWhitespace, the public fields consequently report Integer as the erased parameter and Object as the instantiated parameter. This also prevents correct unboxing followed by widening for a Predicate<Integer> implementation accepting long.

Read the two method-type arguments in the existing raw order. The raw bootstrap representation and its string-concatenation consumers are unchanged.

Validation: two normal Java-source metadata regressions fail before the fix and pass afterward. All 10 tests in InvokeDynamicTest, including existing bytecode roundtrip/virtual/constructor cases, pass. No full suite was run.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  252 files  ±0    252 suites  ±0   15m 52s ⏱️ - 1m 8s
  912 tests +2    900 ✅ +2  12 💤 ±0  0 ❌ ±0 
2 202 runs  +6  2 150 ✅ +6  52 💤 ±0  0 ❌ ±0 

Results for commit 1822dea. ± Comparison against base commit 4251d20.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant