On Mon, 16 Mar 2026 18:05:13 GMT, Vicente Romero <[email protected]> wrote:
>> this test case is being rejected by javac:
>>
>> class Test {
>> Test(Test t) {}
>>
>> Test(String s) {
>> this(new Test());
>> }
>>
>> Test() {}
>> }
>>
>> here what is happening is that when analyzing the `new Test()` invocation
>> the code to determine if there is an enclosing instance for this expression,
>> javac is not checking first if there is an enclosing instance at all. This
>> analysis shouldn't be done for cases like the one above for which there is
>> no enclosing instance.
>>
>> TIA
>
> Vicente Romero has updated the pull request incrementally with two additional
> commits since the last revision:
>
> - review comments
> - review comments
Marked as reviewed by liach (Committer).
-------------
PR Review:
https://git.openjdk.org/valhalla/pull/2231#pullrequestreview-3955748976