Compilation error with JDK9-ea+138
Alex Buckley
alex.buckley at oracle.com
Wed Oct 5 17:27:53 UTC 2016
This isn't a Jigsaw issue, please mail compiler-dev instead, being sure
to note which JDK 9 build you are compiling with.
On 10/5/2016 12:55 AM, Christian Beikov wrote:
> The following used to compile just fine on JDKs < 9
>
> @Override
> public <C, R> SimpleCase<C, R> selectCase(Expression<? extends C>
> expression) {
> return selectCase((Class<R>) null, expression);
> }
>
> public <C, R> SimpleCase<C, R> selectCase(Class<R> type,
> Expression<? extends C> expression) {
> return new SimpleCaseExpression<C, R>(this, type, expression);
> }
>
> but now fails with:
> error: incompatible types: SimpleCase<CAP#1,R> cannot be converted
> to SimpleCase<C,R>
>
> The error is in the first selectCase method.
>
> Is that a bug in the compiler?
>
> Regards,
> Christian
More information about the jigsaw-dev
mailing list