Assignment context defined ?
daniel.smith at oracle.com
Mon Dec 16 16:06:25 PST 2013
On Dec 12, 2013, at 5:19 PM, Stephan Herrmann <stephan.herrmann at berlin.de> wrote:
> Skimming through old communication I stumbled upon
> I couldn't yet find any of what had been promised back then,
> am I looking in the wrong places? :)
Just came across it on my loose ends list. Since this is not a new problem, I've decided to punt on it while reporting a bug against the JLS:
> On a different note, when reading 18.5.1, which says:
> "Where P1, ..., Pp (p ≥ 1) are the type parameters of m"
> it still isn't clear from the immediate context that these
> P1... may include type parameters of the declaring class of
> a constructor invoked using diamond.
> Meanwhile 18.2.1 has a reference to 15.9.3, which helps.
> Maybe a similar note would also improve 18.5.1, given that
> there's no direct connection from/to 18.2.1.
I appreciate the confusion, but this is too many levels deep to put an explanation here. The mapping from constructors to "methods" happens way back in 15.9.3. This refers to 15.12.2, which steps through 184.108.40.206 and 220.127.116.11 (or more), which refers to 18.5.1. That's a lot of surface area to be adding extra reminders about "by the way, we might be talking about notional methods derived from constructors here". I think it's better just to leave that stuff in 15.9. (An even better solution would be to somehow generalize about methods and constructors, rather than doing this "as if it were a method" business, but oh well...)
More information about the lambda-spec-experts