| Summary: | Inferencing ignores @returns tag with no actual return statement | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
Support for the @returns tag was added in bug 459499, but it looks like we are failing to find the doc associated with the ExpressionStatement. Tern handles our type inferencing now. Closing invalid. |
Consider the following snippet: /** * @returns {Number} */ Foo.bar = function() {}; if you activate assist on Foo. you will see the return type of bar is listed as 'undefined', but it is explicitly doc'd as Number. If you change the snippet to include a return statement it works as expected: /** * @returns {Number} */ Foo.bar = function() {return 2;};