Bug 170467 - Abstract inter-type declaration using templates in parameters doesn't work.
Summary: Abstract inter-type declaration using templates in parameters doesn't work.
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.3RC1   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 1.5.4   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-15 09:17 EST by Sergey Olefir CLA
Modified: 2007-10-10 10:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Olefir CLA 2007-01-15 09:17:53 EST
Build ID: M20060921-0945

Tested in Eclipse (3.2.1 M20060921-0945) using AJDT 1.4.1.200611230655 (AspectJ 1.5.3.200611221118).

The enclosed source code fails to compile with the message on ExtendedBaseClass:
must implement abstract inter-type declaration: void test.BaseClass.setSomething(java.util.Set<java.lang.String>)

Any of the following fixes it:
- Declaring BaseClass.setSomething as non-abstract and providing empty body (in Aspect file).
- Changing parameter from Set<String> to just Set.

More information:
Source code:

public abstract class BaseClass
{
	// Empty.
}

public aspect BaseClassAspect
{
	public abstract void BaseClass.setSomething(Set<String> somethings);
}

public class ExtendedBaseClass extends BaseClass
{
	@Override
	public void setSomething(Set<String> somethings)
	{
		// Doh.
	}
}
Comment 1 Sergey Olefir CLA 2007-01-15 09:22:43 EST
Possibly relevant information about JDKs.

Eclipse is launched using Sun JDK 1.6
Java(TM) SE Runtime Environment (build 1.6.0-b105)

However default JRE within Eclipse (and used for AspectJ compilation) is Sun JDK 1.5
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)


Compiler compliance level set to 5.0.
Comment 2 Andrew Clement CLA 2007-01-23 05:46:54 EST
tests and fix committed - thanks for the clear bug report.
Comment 3 Andrew Clement CLA 2007-01-29 04:35:13 EST
fix available in latest dev build