Summary: | interface with same-named method generates compile error | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Kevin Huber <kevin.huber> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0 | ||
Target Milestone: | 2.0 F4 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Kevin Huber
2002-06-12 13:11:23 EDT
public interface TestInterface { public void TestInterface(); } ---> method has constructor name This is only a warning, and you can turn it off in the compiler preferences (Window>Preferences>Java>Compiler>Errors and Warnings>Methods with constructor name). By default, the warning is on, since this is generally not intentional and rather misleading. public interface TestInterface { public TestInterface(); } ---> interface cannot have constructor. I don't see a problem with this error. Given it has no return type, this declaration would be a constructor (with no actual body). Why is this a problem for you ? Closing, please reopen if you think we should not report an error. |