Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347880 - [assist] Expressions should be preferred over types in return statement.
Summary: [assist] Expressions should be preferred over types in return statement.
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 00:09 EDT by Srikanth Sankaran CLA
Modified: 2020-02-23 13:07 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srikanth Sankaran CLA 2011-06-01 00:09:32 EDT
BETA_JAVA7 branch : (problem also exists in HEAD, but the example
below is from BETA_JAVA7 branch)

The method org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding.computeCompatibleMethod(MethodBinding, TypeBinding[], Scope, InvocationSite) ends with
a return statement of the form:

// check presence of unchecked argument conversion a posteriori (15.12.2.6)
return methodSubstitute;

Edit this statement and bring it to the form

return meth|

and try ctrl-space in the position marked with |

The first proposal is the type MethodBinding and the second proposal
is methodSubstitute. The second proposal makes way more sense in the
return statement context and its relevance should be boosted enough
to propose it ahead of the type.
Comment 1 Ayushman Jain CLA 2011-06-01 04:23:11 EDT
I'll investigate, time permitting. Though the problem may not be general to return statements, but may be occuring in this specific case.
Comment 2 Eclipse Genie CLA 2020-02-23 13:07:44 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.