Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368790 - Unreachable function appears in content assist
Summary: Unreachable function appears in content assist
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Xiao Bin Chen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-17 01:40 EST by fahua jin CLA
Modified: 2017-02-23 14:18 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fahua jin CLA 2012-01-17 01:40:46 EST
Build Identifier: 0.8.0.v201201162102

I'm not sure for the true requirement for below scenario,

1) I have a library named Lib1, which has a function named functionName()
2) I have another library named Lib2, it also has a function named functionName().
3) In the Lib1, I use the Lib2 by statement 'use Lib2;", and create a new function named lib1_Func. In the body of the lib1_Func, I type character 'f' to invoke the content assist. Now it displays functionName from both Lib1 & Lib2. I choose either functionName from Lib1 or Lib2, only functionName (do not have the library name ahead of the functionName) is input to the source file. 

Do you have any comments for this question? 

Reproducible: Always
Comment 1 Brian Svihovec CLA 2012-01-17 11:21:37 EST
I believe the function from Lib1 should 'shadow' the function from Lib2, unless you fully qualify the invocation with 'Lib2'.  Either way, only one function should appear in content assist, because only one function can run.
Comment 2 Xiao Bin Chen CLA 2012-01-18 00:02:20 EST
I will see if Content assist could add "Lib2." if the current part already has the same function name. By the way do we support function overload? (same function name, with different number of parameters or other situation)
Comment 3 Brian Svihovec CLA 2012-01-18 07:01:48 EST
To be clear, the user should only see one 'functionName' for the following:

Lib1
  use Lib2;
 
  function functionName() end

  function lib1_Func()
     f<ca>
  end
end

The functionName being displayed should be from Lib1, since the scope of the current part will be searched before the scope of Lib2.

I will need to investigate the answer on function overloading.
Comment 4 Xiao Bin Chen CLA 2012-02-09 21:58:07 EST
fixed.
Comment 5 fahua jin CLA 2012-02-19 21:42:54 EST
Verified in 0.8.0.v201202190901.