Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 385111 - [1.8][compiler] Compiler fails to flag undefined annotation type.
Summary: [1.8][compiler] Compiler fails to flag undefined annotation type.
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: BETA J8   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 287648
  Show dependency tree
 
Reported: 2012-07-15 00:55 EDT by Srikanth Sankaran CLA
Modified: 2012-07-15 07:39 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 Srikanth Sankaran CLA 2012-07-15 00:55:10 EDT
BETA_JAVA8:

The grammar rules introduced at 1.7 time to support diamond, union types 
and try-with-resources need to be harmonized for JSR308 related changes.
The grammar file in the 308 branch was completely oblivious to these changes
made in master/head version of grammar. During the merge, the new rules
from master/head were integrated into the grammar by mere textual insertion
and resolution of conflicts where they occurred. This is not enough as
illustrated by this example, where we fail to flag an undefined annotation
type.

Also conflict-resolution adopted at merge time is not always proper and needs
scrutiny (e.g Type0 should have been used in places where TypeInternal is
used)

//------------------------------------8<--------------------
import java.util.ArrayList;
import java.util.List;

public class X {
	public void foo(String fileName) {
		List<String> l = new @MissingTypeNotIgnored ArrayList<String>();
		List<String> l1 = new @MissingTypeIgnored ArrayList<>();
	}
}