Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328840

Summary: declare @field failing to cope with some signatures
Product: [Tools] AspectJ Reporter: Andrew Clement <aclement>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.6.10   
Target Milestone: 1.6.11   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Andrew Clement CLA 2010-10-27 11:04:17 EDT
Found by Arjen, an error is reported against this:

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;


public aspect Wibble {

	declare @field: (@III *) Song.*: @Foo;
	
//	before(): get((@III *) Song.*) {
	//	System.out.println();
	//} 
}

@III
class XX {
	
}
class Song {

	XX i;
	
	void foo() {
		System.out.println(i);
	}
}

@Retention(RetentionPolicy.RUNTIME)
@interface III {}
@Retention(RetentionPolicy.RUNTIME)
@interface Foo {}
Comment 1 Andrew Clement CLA 2010-10-27 12:14:24 EDT
this is due to the support for compound field signature patterns in declare statements that got added recently, which kicks in when that first '(' is hit.