Bug 79512 - [1.5] Extract Method must not generate return type with type variable [refactoring][1.5]
Summary: [1.5] Extract Method must not generate return type with type variable [refact...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-25 13:21 EST by Markus Keller CLA
Modified: 2004-12-15 12:30 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2004-11-25 13:21:10 EST
Extract Method must not generate return type with type variable.

	public Object foo() {
		return /*[*/A_test363.class/*]*/;
	}

=> was:
	protected Class<T> extracted() {
		return /*[*/A_test363.class/*]*/;
	}

=> expected: Class<A_test363> or Class<?> or Class<? extends A_test363> or
whatever makes sense.

Came up when setting test project compiler compliance to 1.5. Disabled test363.
Comment 1 Dirk Baeumer CLA 2004-11-29 11:26:21 EST
Encountered this as well. The problem is that the type binding returned form the
type literal expression is Class<T>. However it should be Class<A_test363>

Moving to JDT/Core.
Comment 2 Olivier Thomann CLA 2004-11-29 12:47:27 EST
Fixed and released in HEAD.
Regression test added in ASTConverter15Test.test0086
Comment 3 Jerome Lanneluc CLA 2004-12-15 12:30:13 EST
Verified (in I20041214-2000) that the test ensures the type binding of a class
literal includes the class name as the type argument of java.lang.Class.