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

Reply via email to