Integrated: 8266436: Synthetic constructor trees have non-null return type

Jan Lahoda jlahoda at openjdk.java.net
Wed May 5 10:33:50 UTC 2021


On Mon, 3 May 2021 16:54:41 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> When javac generates the AST for default (synthetic) constructor, it will create a return type `void` for them, while for ordinary constructors, it uses `null` as the return type. This change proposes to consistently use `null` as the return type of constructors. (Eventually, we might want to avoid generating the synthetic constructor tree.)

This pull request has now been integrated.

Changeset: a8046c91
Author:    Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/a8046c9157c4dca601843c953ce67f7372a87a52
Stats:     23 lines in 2 files changed: 17 ins; 3 del; 3 mod

8266436: Synthetic constructor trees have non-null return type

Reviewed-by: vromero

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

PR: https://git.openjdk.java.net/jdk/pull/3842


More information about the compiler-dev mailing list