Open GoogleCodeExporter opened 9 years ago
This is kind of like a halting problem, since it's difficult to say (when
scopes etc. are involved) whether this is
actually a legal setup. I'm sure we could try to detect this, but we certainly
won't be able to detect all cases.
Consider a variant:
@Provides
Bob provideBob(final Provider<Dagny> dagnyProvider) {
Dagne dagne = new Random().nextInt() == 5 ? dagneProvider.get() : new CrazyDagne();
...
}
In this case, the program should eventually halt, but it's very difficult to
detect that just by looking at the
method signatures and examining behaviour.
I'm going to mark this as 'WontFix', just because solving the general case is
impossible and solving the
specific case is quite complex. There's a lot of ways to write infinite loops
and stack overflows, and it's not a
winning business to try and detect and prevent them all.
Original comment by limpbizkit
on 29 May 2008 at 3:52
Original issue reported on code.google.com by
robbie.v...@gmail.com
on 2 Feb 2008 at 6:37