Re: Exploring inference for sealed types

2019-10-02 Thread Alex Buckley
You speak of "compilation unit" as if it means the scope of work performed by javac and Maven. ("compiles each module separately as its own compilation unit") That's not the meaning. The meaning is as given in https://docs.oracle.com/javase/specs/jls/se13/html/jls-7.html#jls-7.3 On 10/2/2019

Re: Exploring inference for sealed types

2019-10-02 Thread Peter Levart
Hi, On 9/24/19 8:34 PM, Brian Goetz wrote: So one sensible increment atop the baseline is: (A) if a top-level type is explicitly declared sealed, and has no permits clause, we can infer the permits clause from the subtypes in the compilation unit (or more narrowly, the _nested_ subtypes).  Thi

Re: instance initializer

2019-10-02 Thread Peter Levart
Hi, On 9/6/19 2:54 AM, Brian Goetz wrote: In that case, what we would see is that on exit, neither i nor j were either DA or DU, and we would issue a compiler error.  For each field, there are three possibilities:  - The field is DU on all paths out of the ctor; we initialize it from the cor