[code-reflection] RFR: Add support for enclosing class types

Paul Sandoz psandoz at openjdk.org
Thu May 30 20:30:18 UTC 2024


On Thu, 30 May 2024 19:46:56 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> test/langtools/tools/javac/reflect/MethodReferenceTest.java line 185:
>> 
>>> 183:     @IR("""
>>> 184:             func @"test8" (%0 : MethodReferenceTest)void -> {
>>> 185:                 %1 : java.util.function.IntFunction<.<MethodReferenceTest, MethodReferenceTest$A<java.lang.String>>> = lambda (%2 : int).<MethodReferenceTest, MethodReferenceTest$A<java.lang.String>> -> {
>> 
>> Missing `[]`?
>> 
>> Suggestion:
>> 
>>                 %1 : java.util.function.IntFunction<.<MethodReferenceTest, MethodReferenceTest$A<java.lang.String>[]>> = lambda (%2 : int).<MethodReferenceTest, MethodReferenceTest$A<java.lang.String>[]> -> {
>
> uhmmm - the test is passing but you are correct that there should be some brackets in here. I'll investigate

Hmm... i suspect the it's due to canonicalization. We parse the expected model and serialize it out. Depending on the operation its result type is determined by say its operands rather than what is explicitly declared in the text.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/107#discussion_r1621392621


More information about the babylon-dev mailing list