Skip to content

Conversation

@aeberhart
Copy link
Contributor

JList is initialized with 0 or 1 arguments. The original is this:
if (arguments.length === 1) {
sequence.push(arguments[0]);
}
If an argument is passed, it is added. The new code mimics this.

The second issue is in the wildard handling. In the list case, arrays need to be flattended. The issue comes from the unnecessary handling of maps. Like scalar types, those simply need to be added to the result

JList is initialized with 0 or 1 arguments. The original is this:
        if (arguments.length === 1) {
            sequence.push(arguments[0]);
        }
If an argument is passed, it is added. The new code mimics this.

The second issue is in the wildard handling. In the list case, arrays
need to be flattended. The issue comes from the unnecessary handling of
maps. Like scalar types, those simply need to be added to the result
@github-actions
Copy link

Test Results

1 720 tests  ±0   1 716 ✅ +2   4s ⏱️ ±0s
  116 suites ±0       4 💤  - 2 
  116 files   ±0       0 ❌ ±0 

Results for commit 9a6061a. ± Comparison against base commit 8b2e385.

@aeberhart aeberhart requested a review from uw4 October 18, 2025 06:22
Copy link
Contributor

@uw4 uw4 left a comment

Choose a reason for hiding this comment

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

LGTM
This brings Java nearer to the original JS

else
// This case does NOT exist in Javascript! Why?
sequence.add(el);
sequence.add(el);
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch!

@uw4 uw4 merged commit 4cb3722 into main Oct 20, 2025
2 checks passed
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.

Single-Level vs Multi-Level Wildcard produces unexpected result on Predicate

3 participants