Lines 3636-3639
Link Here
|
3636 |
}, |
3636 |
}, |
3637 |
"true"); |
3637 |
"true"); |
3638 |
} |
3638 |
} |
|
|
3639 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=91728 |
3640 |
public void test060() { |
3641 |
this.runConformTest( |
3642 |
new String[] { |
3643 |
"X.java", |
3644 |
"import java.util.*;\n" + |
3645 |
"\n" + |
3646 |
"public class X<S> {\n" + |
3647 |
" \n" + |
3648 |
" public <U> X<U> test() {\n" + |
3649 |
" return null;\n" + |
3650 |
" }\n" + |
3651 |
" \n" + |
3652 |
"}\n" + |
3653 |
"\n" + |
3654 |
"class B extends X<Set> {\n" + |
3655 |
" \n" + |
3656 |
" public B test() {\n" + |
3657 |
" return null;\n" + |
3658 |
" }\n" + |
3659 |
" \n" + |
3660 |
"}\n" |
3661 |
}, |
3662 |
""); |
3663 |
} |
3664 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=91728 - variation |
3665 |
public void test061() { |
3666 |
this.runNegativeTest( |
3667 |
new String[] { |
3668 |
"X.java", |
3669 |
"import java.util.*;\n" + |
3670 |
"\n" + |
3671 |
"public class X<S> {\n" + |
3672 |
" \n" + |
3673 |
" public <U> X<U> test(U u) {\n" + |
3674 |
" return null;\n" + |
3675 |
" }\n" + |
3676 |
" \n" + |
3677 |
"}\n" + |
3678 |
"\n" + |
3679 |
"class B extends X<Set> {\n" + |
3680 |
" \n" + |
3681 |
" public B test(Set s) {\n" + |
3682 |
" return super.test(s);\n" + |
3683 |
" }\n" + |
3684 |
" \n" + |
3685 |
"}\n" |
3686 |
}, |
3687 |
"----------\n" + |
3688 |
"1. WARNING in X.java (at line 13)\n" + |
3689 |
" public B test(Set s) {\n" + |
3690 |
" ^^^^^^^^^^^\n" + |
3691 |
"The method test(Set) of type B should be tagged with @Override since it actually overrides a superclass method\n" + |
3692 |
"----------\n" + |
3693 |
"2. ERROR in X.java (at line 14)\n" + |
3694 |
" return super.test(s);\n" + |
3695 |
" ^^^^^^^^^^^^^\n" + |
3696 |
"Type mismatch: cannot convert from X<Set> to B\n" + |
3697 |
"----------\n"); |
3698 |
} |
3639 |
} |
3699 |
} |