Bug 3906 - extract method: compile errors introduces (corner case) (1GF5SIM)
Summary: extract method: compile errors introduces (corner case) (1GF5SIM)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Dirk Baeumer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 23:02 EDT by Erich Gamma CLA
Modified: 2002-03-11 09:52 EST (History)
1 user (show)

See Also:


Attachments
Bad error message (5.54 KB, image/gif)
2002-02-27 11:43 EST, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Gamma CLA 2001-10-10 23:02:49 EDT
AK (6/11/01 3:47:12 PM)
1.
	public class Wcf {
	void hg(){
		class A extends B{
			void m(){
				f();   //<<<<<<<<
			}
		}
	}  
}  

class B{
	void f(){}
}

2. extract the selected line to a method m
2. two compile errors are introduced

it is a corner case - locally defined type
Comment 1 Martin Aeschlimann CLA 2001-10-16 11:13:36 EDT
moved to 'active'
Comment 2 DJ Houghton CLA 2001-10-24 07:24:24 EDT
PRODUCT VERSION:
	122

Comment 3 Erich Gamma CLA 2001-11-11 14:35:50 EST
We can accept this limitation, suggest to defer.
Comment 4 Dirk Baeumer CLA 2001-11-12 08:26:37 EST
Reactive check if new method name conflicts with old method name. It got 
disabled since we overloafding case wasn't handled correctly

Comment 5 Dirk Baeumer CLA 2002-01-23 12:26:11 EST
You get an error message saying that method m() already exists in A.

Fixed in build > 20021224
Comment 6 Martin Aeschlimann CLA 2002-02-13 06:37:00 EST
The test case now generates an exception.
Comment 7 Dani Megert CLA 2002-02-27 11:43:20 EST
Tested against I2002026
==>
Changed to P1 and major because an "unexpected error" dialog comes up (see
attached picture)
Comment 8 Dani Megert CLA 2002-02-27 11:43:52 EST
Created attachment 404 [details]
Bad error message
Comment 9 Dirk Baeumer CLA 2002-03-08 13:38:07 EST
Daniel, can you please drop by. The test case again works for me. I am not able 
to reproduce the problem.
Comment 10 Dani Megert CLA 2002-03-11 09:52:48 EST
No longer reproducable in 20020307: the user gets a correct warning that m is
already defined in A.