mrszj / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Compilation error involving generics in InjectorImpl.java #197

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using JDK 6 and running the build script for Guice, I get

compile:
Created dir: /space/src/guice/build/classes
Compiling 149 source files to /space/src/guice/build/classes
/space/src/guice/src/com/google/inject/InjectorImpl.java:467: reference to
visit is ambiguous, both method
visit(com.google.inject.spi.ConstantBinding<? extends T>) in
com.google.inject.spi.BindingVisitor<capture#676 of ? super T> and method
visit(com.google.inject.spi.ConvertedConstantBinding<? extends T>) in
com.google.inject.spi.BindingVisitor<capture#676 of ? super T> match
      bindingVisitor.visit(this);
                    ^
1 error

Not sure exactly what this means but one plausible change that javac
accepts is this:

bindingVisitor.visit((ConstantBinding<T>) this);
                     ^^^^^^^^^^^^^^^^^^^^

Original issue reported on code.google.com by typr...@gmail.com on 9 May 2008 at 12:47

GoogleCodeExporter commented 9 years ago
Looks like a dupe of issue #162, but I don't seem to have permissions to mark 
it as such.

Original comment by typr...@gmail.com on 9 May 2008 at 12:49

GoogleCodeExporter commented 9 years ago
Dupe of 162. 

Original comment by limpbizkit on 14 May 2008 at 3:12