Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 60533 Details for
Bug 174445
[1.5][compiler] missing unchecked conversion warning upon parametrized method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Test case modifications
org.eclipse.jdt.core.tests.compiler_174445_01.txt (text/plain), 1.65 KB, created by
Maxime Daniel
on 2007-03-12 03:17:02 EDT
(
hide
)
Description:
Test case modifications
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2007-03-12 03:17:02 EDT
Size:
1.65 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java >=================================================================== >--- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java (revision 107) >+++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java (working copy) >@@ -7381,4 +7381,43 @@ > "SUCCESSSUCCESS" > ); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=174445 >+public void test122() { >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " enum Enum1 {\n" + >+ " value;\n" + >+ " }\n" + >+ " enum Enum2 {\n" + >+ " value;\n" + >+ " }\n" + >+ " static abstract class A<T> {\n" + >+ " abstract <U extends T> U foo();\n" + >+ " }\n" + >+ " static class B extends A<Enum<?>> {\n" + >+ " @Override\n" + >+ " Enum<?> foo() {\n" + >+ " return Enum1.value;\n" + >+ " } \n" + >+ " }\n" + >+ " public static void main(String[] args) {\n" + >+ " A<Enum<?>> a = new B();\n" + >+ " Enum2 value = a.foo();\n" + >+ " }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. WARNING in X.java (at line 13)\n" + >+ " Enum<?> foo() {\n" + >+ " ^^^^\n" + >+ "Type safety: The return type Enum<?> for foo() from the type X.B needs unchecked conversion to conform to Enum<E> from the type X.A<Enum<?>>\n" + >+ "----------\n" + >+ "2. WARNING in X.java (at line 13)\n" + >+ " Enum<?> foo() {\n" + >+ " ^^^^\n" + >+ "Type safety: The return type Enum<?> for foo() from the type X.B needs unchecked conversion to conform to U from the type X.A<T>\n" + >+ "----------\n"); > } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 174445
:
60532
|
60533
|
61057
|
61146