Compilation error with JDK9-ea+138
    Christian Beikov 
    christian.beikov at gmail.com
       
    Wed Oct  5 07:55:30 UTC 2016
    
    
  
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