Fwd: Re: Compilation error with JDK9-ea+138

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Oct 6 15:17:57 UTC 2016


Christian,

As a general rule, it is better if you can post complete but reduced 
test cases, and post all the messages from the compiler. It is often 
hard to properly diagnose cases where someone posts some fragment of 
code and asks what's wrong.

-- Jon


On 10/6/16 8:08 AM, Christian Beikov wrote:
>
> I have been directed to this mailing list for this error.
>
> Is this a known issue?
>
>
>
> -------- Weitergeleitete Nachricht --------
> Betreff: 	Re: Compilation error with JDK9-ea+138
> Datum: 	Wed, 05 Oct 2016 10:27:53 -0700
> Von: 	Alex Buckley <alex.buckley at oracle.com>
> Organisation: 	Oracle Corporation
> An: 	jigsaw-dev at openjdk.java.net
>
>
>
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20161006/2539fa04/attachment.html>


More information about the compiler-dev mailing list