Notes on implementing concise calls to constructors with type parameters

Ulf Zibis Ulf.Zibis at gmx.de
Fri May 15 01:24:37 PDT 2009


+1

Am 15.05.2009 09:26, Howard Lovatt schrieb:
> *class X<T> {*
> *  public X( T t ) { ... }*
> *}*
>
>
> Therefore the textual substitution method proposed works for both of
> these cases.
>
>   

... and additionally it saves JLS change regarding error/warning on:
    X<String> xs = new X( 1 );
;-)
If substituted by:
    X<String> xs = new X<String>( 1 );
it is clearly an error.


-Ulf





More information about the coin-dev mailing list