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

Jan Lahoda jlahoda at openjdk.org
Tue Nov 15 14:22:03 UTC 2022

On Wed, 9 Nov 2022 19:48:01 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>>   Not looking for common supertype, not solving in a loop.
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java line 659:
>> 657: 
>> 658:     public Type instantiatePatternType(Type expressionType, TypeSymbol patternTypeSymbol) {
>> 659:         if (expressionType.tsym == patternTypeSymbol)
> not sure we are dealing with cases where expressionType is a type variable or an intersection type, are there tests covering these cases, sorry if I'm missing something here

Good catch, thanks! Should be fixed in [5afc602](https://github.com/openjdk/jdk/pull/10814/commits/5afc60236005d5ea77984f2baeca7e928334ce3a). Thanks!


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

More information about the compiler-dev mailing list