Bug 177174 - [assist] Wrong names are proposed as unresolved local variable
Summary: [assist] Wrong names are proposed as unresolved local variable
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-13 12:55 EDT by David Audel CLA
Modified: 2007-04-27 09:43 EDT (History)
0 users

See Also:


Attachments
Proposed fix (60.69 KB, patch)
2007-04-12 05:16 EDT, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2007-03-13 12:55:12 EDT
Build id: I20070306-1200

public class X {
	void foo () {
		label : {
			la| // do ctrl+space at |
		}
	}
}

'label' is proposed and should not.
Comment 1 David Audel CLA 2007-03-13 13:00:54 EDT
Another bug in the smae area

public class X {
	void foo () {
		label : {
			la| // do ctrl+space at |
			{
				break label;
			}
		}
	}
}

there is two 'label' proposals.
Comment 2 David Audel CLA 2007-04-12 04:57:47 EDT
Another problem.

public class X {
  void foo() {
    return (zzz) zz| // do ctrl+space at |
  }
}

'zzz' shouldn't be proposed
Comment 3 David Audel CLA 2007-04-12 05:16:23 EDT
Created attachment 63593 [details]
Proposed fix

Algorithm to accumulate potential unresolved names is rewritten.
Performances of unresolved names propositions are slightly improved.
Comment 4 David Audel CLA 2007-04-12 05:22:56 EDT
Released for 3.3M7

Tests added
  CompletionTests#testNameWithUnresolvedReferences012() -> testNameWithUnresolvedReferences017()
Comment 5 Olivier Thomann CLA 2007-04-27 09:43:53 EDT
Verified for 3.3M7 using I20070427-0010