eclipse-jdt / eclipse-jdt/eclipse.jdt.core

[21][record patterns][type inference] investigate need/correctness of calling parameterizedWithWildcard() in deriveTPrime()

Open
#1,344 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

Ref: https://github.com/eclipse-jdt/eclipse.jdt.core/pull/1341#issuecomment-1704411918

ref; https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1336#issuecomment-1703815933
See spec inside 18.5.5 bullet 3: "If T is a parameterized type, let Tc be the result of capture conversion (5.1.10) applied to T, and let Z1, ..., Zk (k ≥ 0) be the type variables produced by capture that are type arguments in Tc. (This includes type variables produced by the capture conversion in this step, and type variables produced by capture conversion elsewhere.) Let β1, ..., βk (k ≥ 0) be inference variables, and let θ be the substitution[Z1:=β1, ..., Zk:=βk]. T' is Tc θ."

Corresponding impl is inside deriveTPrime(), where I see these discrepancies:

calls parameterizedWithWildcard() which is not called for in the spec

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.