| Summary: | [1.8][compiler] final modifier should not be allowed on this parameter. | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Srikanth Sankaran <srikanth_sankaran> |
| Component: | Core | Assignee: | shankha banerjee <shankhba> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jarthana, shankhba, srikanth_sankaran |
| Version: | 4.4 | ||
| Target Milestone: | BETA J8 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Srikanth Sankaran
Srikanth, I am assigning this one to Shankha as he is more likely spare time for this right now. Shankha, please take this forward. Hi,
Could you please help me with a test case:
I have the following test case:
class Y {
void foo(final Y this) {} // Eclipse Error: Syntax error, modifiers are not allowed here // javac : No errors
}
class Z {
class A {
A (final Z this) {} // Eclipse Error: (1) Syntax error, modifiers are not allowed here (2) The explicit 'this' parameter is expected to be qualified with Z // javac error: the receiver name does not match the enclosing outer class type A (final Z this) {}
void foo (final Z.A this) {} // Eclipse Error: Syntax error, modifiers are not allowed here // javac: No errors
}
class B {
B (final Z.B this) {} // Eclipse Error: (1) Syntax error, modifiers are not allowed here, (2) The declared type of the explicit 'this' parameter is expected to be Z X.java // javac: error: the receiver type does not match the enclosing outer class type B (final Z.B this {}
void foo (final Z this) {} // Similar errors as above.
}
}
Thanks,
Sorry, my bad. This has already been taken care of by the duplicate bug. *** This bug has been marked as a duplicate of bug 403410 *** |