> 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

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

Changes:
  - all: https://git.openjdk.org/valhalla/pull/2231/files
  - new: https://git.openjdk.org/valhalla/pull/2231/files/3049d4d8..f31062ec

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=valhalla&pr=2231&range=02
 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=2231&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/valhalla/pull/2231.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2231/head:pull/2231

PR: https://git.openjdk.org/valhalla/pull/2231

Reply via email to