-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
This is the specific example that bit us. There may be a more general case to
be found.
The visibility modifiers (or lack thereof) on A and B are important.
---
package x;
public class A<T> {
A() {}
}
---
package y;
class B {}
---
package y;
class C {
C(A<B> someParam) {}
}
---
The above code will yield a GWT compiler error on the ginjector fragment for
package y saying that A's constructor isn't visible. This is a bit confusing
since generally you can inject another package's public object that only has a
package private constructor. If you look at the generated fragment for package
y, you'll see that it tries to call A's constructor.
If you make B a public class things compile fine. Presumably gin puts the
construction of A<B> in package x's fragment.
In this case it would be helpful for gin to report that it's impossible for it
to create a ginjector rather than generating uncompilable code.
Original issue reported on code.google.com by [email protected]
on 2 May 2013 at 2:34