Open chrswk opened 7 years ago
workaround:
Futures.<String>allAsList ....
the reason for the different behaviour in eclipse seems to be that javac and eclipse java compiler seem to behave differently
and i wonder why we dont generate real varargs here:
final List<String> allAsList = Futures.allAsList( _mockService, _mockService_1, _mockService_2).get();
Thanks for looking into it.
I'm not sure which "way" Xtend should go for when writing allAsList(#[...])
, since there's the overloaded method allAsList(Iterable<? extends ListenableFuture<? extends V>> futures)
that should also be compatible with Collections.unmodifiableList
that I usually see from #[...]
?
yes that might be the case so something like
val allAsList = Futures.allAsList(mockService, mockService, mockService).get
would be the natural solution
I spent too much time chasing this error. I'm not sure what's causing it and the Xtend code that produces it compiles fine in Eclipse but fails during the Maven build. To be honest, I'm not even sure if it's the fault of Xtend or if something else is to blame.
Using:
The error:
I'm able to reproduce it with this simple Xtend code:
I normally just use
Futures.allAsList(mockService, mockService, mockService)
but I somehow messed up some calls by wrapping them in a list.The generated Java code and the line that causes the error:
It should probably be
new ListenableFuture<String>[]
? But why does Eclipse not complain about it? Is there some additional inference going on?-Chris