fmgasparino / google-gin

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

Enums cannot be bound as constants #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Binding an enum as a constant currently results in a compile time error:

public void configure() {
  bindConstant().annotatedWith(MyAnnotation.class).to(MyEnum.Value);
}
[ERROR] Errors in
'file:/home/schmitt/projects/gin2/out/testrun/gen/com/google/gwt/inject/client/b
indings/MyGinjectorImpl.java'
  [ERROR] Line 20:  Rebind result
'com.google.gwt.inject.client.bindings.MyEnum' must be a class

This looks like a bug, we probably check for isClassOrInterface and get a
null, we need to check for enums as well.

Original issue reported on code.google.com by aragos on 30 Dec 2008 at 11:04

GoogleCodeExporter commented 9 years ago
Patch in review: http://codereview.appspot.com/11858

Original comment by aragos on 1 Jan 2009 at 12:16

GoogleCodeExporter commented 9 years ago

Original comment by aragos on 1 Jan 2009 at 4:47