Summary: | DCR: AST in methods with missing return type | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0 | ||
Target Milestone: | 2.0 M6 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Martin Aeschlimann
2002-04-22 09:43:38 EDT
This is a risky change since it occurs in the MethodScope.createMethod() method. There is no binding created for such a method. This methods sets the flag ignoreFurtherInvestigation for the method declaration. Then its statements are not parsed. Philippe - Do you think it is doable to change this behavior now? I made some changes and asked Kent to double check them. If they are approved, it will be released today. With these changes, we parse the method body which allows you to retrieve the type of the return statement. You will still have a error message in the messages' list of its compilation unit. This method (foo() in your example) won't be seen as defined in its class if used inside another class. This is consistent with the usage of a method which has an invalid return type. Changes released and verified by Kent. Cool. Thanks a lot! |