[PATCH] fix self-assignment in TypeVar

Joel Borggrén-Franck joel.franck at oracle.com
Wed Apr 8 18:43:31 UTC 2015


Hi Liam,

I noticed this last year and changed it in the anno-pipeline/dev forest that has now been merged. Thanks for bringing this up though.

cheers
/Joel
 
> On 27 mar 2015, at 00:05, Liam Miller-Cushon <cushon at google.com> wrote:
> 
> I think this is harmless, but it looks suspicious and is probably
> worth cleaning up.
> 
> (If it's actually a bug then this is not the right patch.)
> 
> # HG changeset patch
> # User Liam Miller-Cushon <cushon at google.com>
> # Date 1427408687 25200
> #      Thu Mar 26 15:24:47 2015 -0700
> # Node ID 99c3cd409d0a12538c6f7e96c45e87b81d9db8bf
> # Parent  1a0808932668a1fa688d3c0ed1f794adc9b3ce18
> Remove self-assignment in TypeVar
> 
> diff -r 1a0808932668 -r 99c3cd409d0a
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
> --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
> Thu Mar 26 16:17:36 2015 +0100
> +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
> Thu Mar 26 15:24:47 2015 -0700
> @@ -1466,7 +1466,6 @@
>         public TypeVar(Name name, Symbol owner, Type lower) {
>             super(null, TypeMetadata.empty);
>             tsym = new TypeVariableSymbol(0, name, this, owner);
> -            this.bound = bound;
>             this.lower = lower;
>         }



More information about the compiler-dev mailing list