Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Wrong cast allowed
Wrong cast allowed [message #203219] Thu, 12 May 2005 00:23 Go to next message
Eclipse UserFriend
The code underneath compiles in when it should fail.
I tried it with M5 and M6.

Is this related to Bug 89940?

Coconha


public class TestCasting<S extends Comparable<S>> {
public TestCasting() {
S a = (S)(Integer)3; // this should fail
}
}
Re: Wrong cast allowed [message #203340 is a reply to message #203219] Thu, 12 May 2005 14:17 Go to previous messageGo to next message
Eclipse UserFriend
This looks like a different bug. Open a bug in bugzilla.

It appears that instead of recursing on the bounds of the type variable, the
code is recursing on the erasure of the type variable.

Tim

"coconha" <carlos_aydos@rta.nsw.gov.au> wrote in message
news:f228abf903a2ff3a51dcc4f42390f03c$1@www.eclipse.org...
> The code underneath compiles in when it should fail.
> I tried it with M5 and M6.
>
> Is this related to Bug 89940?
>
> Coconha
>
>
> public class TestCasting<S extends Comparable<S>> {
> public TestCasting() {
> S a = (S)(Integer)3; // this should fail
> }
> }
>
Re: Wrong cast allowed [message #203440 is a reply to message #203340] Fri, 13 May 2005 12:52 Go to previous message
Eclipse UserFriend
Fixed ! Will not show up in M7, since was addressed too late.

"Tim Hanson" <thanson@bea.com> wrote in message
news:d6074k$s5v$1@news.eclipse.org...
> This looks like a different bug. Open a bug in bugzilla.
>
> It appears that instead of recursing on the bounds of the type variable,
the
> code is recursing on the erasure of the type variable.
>
> Tim
>
> "coconha" <carlos_aydos@rta.nsw.gov.au> wrote in message
> news:f228abf903a2ff3a51dcc4f42390f03c$1@www.eclipse.org...
> > The code underneath compiles in when it should fail.
> > I tried it with M5 and M6.
> >
> > Is this related to Bug 89940?
> >
> > Coconha
> >
> >
> > public class TestCasting<S extends Comparable<S>> {
> > public TestCasting() {
> > S a = (S)(Integer)3; // this should fail
> > }
> > }
> >
>
>
Previous Topic:Selectively enable/disable hot code replacement for Run Configurations
Next Topic:Adding AntBuildListener
Goto Forum:
  


Current Time: Fri Nov 07 05:23:17 EST 2025

Powered by FUDForum. Page generated in 0.04338 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top