PaperMC / PaperMC/codebook

Inherit parameter names in lambda expressions from the interface

Open
#17 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
22
Forks
1
Avg merge
2m
Merged PRs (30d)
1

Description

Currently, if the mappings are completed for an interface and that interface is used to create a lambda, the parameters of that lambda do not inherit the names from the interface.

Some examples in the source, in ExecuteCommand, the field CALLBACK_CHAINER's inner lambda does not have the correct parameter mappings which are set for ResultConsumer. Also in FillBiomeCommand#makeResolver, the returned lambda for BiomeResolver does not inherit parameter names from the interface.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how interface mappings are completed and then applied when lambdas are created. Compare ExecuteCommand's CALLBACK_CHAINER with ResultConsumer, and FillBiomeCommand#makeResolver with BiomeResolver. Done means lambda parameters inherit the mapped interface names in both examples; add or run the relevant tests if the project provides them.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.