RFR: 8294942: Compiler implementation for Record Patterns (Second Preview) [v4]

Vicente Romero vromero at openjdk.org
Mon Nov 14 16:19:12 UTC 2022


On Fri, 11 Nov 2022 14:01:20 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java line 709:
>> 
>>> 707: 
>>> 708:         //step 1 - create fresh tvars
>>> 709:         for (Type t : vars) {
>> 
>> I'm not sure about this so just a question: shouldn't we run this loop until no more undetVars need to be instantiated? we could also limit until a maximum number of steps in case we find cases that doesn't converge to a solution
>
> In my understanding, we are not creating new undet vars here, and we instantiate them all in this loop, and fix their bounds if needed in the next step, so this should resolve all the vars.

ok, yes I guess we should be fine and if we find any issue in the future we can always go back and react then

-------------

PR: https://git.openjdk.org/jdk/pull/10814


More information about the compiler-dev mailing list