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

Bug 409248

Summary: [1.8][compiler] Type annotations appear clumped into the wrong place
Product: [Eclipse Project] JDT Reporter: Srikanth Sankaran <srikanth_sankaran>
Component: CoreAssignee: Andrew Clement <aclement>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 4.3   
Target Milestone: BETA J8   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 409235    

Description Srikanth Sankaran CLA 2013-05-28 04:11:41 EDT
BETA_JAVA8:

// --
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

public class X {
	public static void main(String[] args) {
		X [][] x = new X @TA [] @TA [] { { null }, { null } };   
	}
}

@Target(ElementType.TYPE_USE)
@interface TA {
	
}

// Both the TAs are annotating the same instruction which looks wrong.
Comment 1 Srikanth Sankaran CLA 2013-05-28 04:12:04 EDT
Andy, thanks for following up.
Comment 2 Andrew Clement CLA 2013-06-04 14:50:47 EDT
This problem is covered by the patch in bug 409517. See test test060a_codeblocks_new_newArrayWithInitializer() in that patch.
Comment 3 Srikanth Sankaran CLA 2013-08-16 07:03:50 EDT
After a cursory glance at the patch I could confirm that this issue
is dealt with there.

*** This bug has been marked as a duplicate of bug 409517 ***