frjaeger220 / google-guice

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

Give an error if you bind to an invalid type. #160

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For example, Guice doesn't support binding to types with type variables.

Original issue reported on code.google.com by crazybob...@gmail.com on 25 Oct 2007 at 11:54

GoogleCodeExporter commented 9 years ago
Unfortunately, this actually (sort-of) works in 1.0 -- if you create a Key for 
List<T>, you can bind it (to say, 
ArrayList) and call Injector.getInstance() to retrieve it. Fortunately, I don't 
think we inject it.

Original comment by limpbizkit on 5 Jun 2008 at 8:20

GoogleCodeExporter commented 9 years ago
I've changed Key so that it cannot hold a TypeVariable like T. This means bad 
keys will fail fast.

Original comment by limpbizkit on 23 Nov 2008 at 8:11