Update to 29b2c218438398769d94ba99ef040852b0acf110 from jdt.core
(up-to a serious of commits from JDT's master)
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
index 36dfbda..a47ae86 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
@@ -2913,4 +2913,31 @@
 		expectedProblemLog
 	);
 }
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383913#c22
+public void test0064() {
+	if (this.complianceLevel >= ClassFileConstants.JDK1_8) {
+		return;
+	}
+	String[] source = new String[] {
+		"X.java",
+		"class X {\n" +
+		"	void foo(X this){}\n" +
+		"}"
+	};
+	String expectedProblemLog =
+			"----------\n" +
+			"1. ERROR in X.java (at line 2)\n" +
+			"	void foo(X this){}\n" +
+			"	           ^^^^\n" +
+			"Explicit declaration of 'this' parameter is allowed only at source level 1.8 or above\n" +
+			"----------\n";
+	runComplianceParserTest(
+			source,
+			expectedProblemLog,
+			expectedProblemLog,
+			expectedProblemLog,
+			expectedProblemLog,
+			expectedProblemLog
+		);
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
index ccefc66..9103e2b 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
@@ -421,6 +421,7 @@
 		expectedProblemAttributes.put("DiamondNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("DirectInvocationOfAbstractMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("DisallowedTargetForAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("DisallowedExplicitThisParameter", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("DiscouragedReference", new ProblemAttributes(CategorizedProblem.CAT_RESTRICTION));
 		expectedProblemAttributes.put("DuplicateAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("DuplicateAnnotationMember", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
@@ -532,9 +533,11 @@
 		expectedProblemAttributes.put("IllegalPrimitiveOrArrayTypeForEnclosingInstance", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalQualifiedEnumConstantLabel", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalQualifiedParameterizedTypeAllocation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("IllegalQualifierForExplicitThis", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("IllegalReturnNullityRedefinition", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("IllegalRedefinitionToNonNullParameter", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("IllegalStaticModifierForMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("IllegalTypeForExplicitThis", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("IllegalTypeVariableSuperReference", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("IllegalUnderscorePosition", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("IllegalUsageOfQualifiedTypeReference", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
@@ -619,7 +622,6 @@
 		expectedProblemAttributes.put("InvalidUsageOfAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidUsageOfForeachStatements", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
-		expectedProblemAttributes.put("InvalidUsageOfReceiverAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidUsageOfStaticImports", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidUsageOfTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidUsageOfTypeArguments", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
@@ -1334,9 +1336,11 @@
 		expectedProblemAttributes.put("IllegalPrimitiveOrArrayTypeForEnclosingInstance", SKIP);
 		expectedProblemAttributes.put("IllegalQualifiedEnumConstantLabel", SKIP);
 		expectedProblemAttributes.put("IllegalQualifiedParameterizedTypeAllocation", SKIP);
+		expectedProblemAttributes.put("IllegalQualifierForExplicitThis", SKIP);
 		expectedProblemAttributes.put("IllegalRedefinitionToNonNullParameter", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
 		expectedProblemAttributes.put("IllegalReturnNullityRedefinition", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
 		expectedProblemAttributes.put("IllegalStaticModifierForMemberType", SKIP);
+		expectedProblemAttributes.put("IllegalTypeForExplicitThis", SKIP);
 		expectedProblemAttributes.put("IllegalTypeVariableSuperReference", SKIP);
 		expectedProblemAttributes.put("IllegalUnderscorePosition", SKIP);
 		expectedProblemAttributes.put("IllegalUsageOfQualifiedTypeReference", SKIP);
@@ -1764,6 +1768,7 @@
 		expectedProblemAttributes.put("WildcardConstructorInvocation", SKIP);
 		expectedProblemAttributes.put("WildcardFieldAssignment", SKIP);
 		expectedProblemAttributes.put("WildcardMethodInvocation", SKIP);
+		expectedProblemAttributes.put("DisallowedExplicitThisParameter", SKIP);
 //{ObjectTeams: new constants:
         expectedProblemAttributes.put("OTJ_RELATED", SKIP);
         expectedProblemAttributes.put("OTCHAP", SKIP);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java
index d987439..b391857 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java
@@ -1033,4 +1033,252 @@
 					"Annot cannot be resolved to a type\n" + 
 					"----------\n");
 	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383913
+	public void test0383913() {
+		this.runNegativeTest(
+				new String[]{
+						"X.java",
+						"public class X {\n" +
+						"	public void foo(Object obj, X this) {}\n" +
+						"	public void foo(Object obj1, X this, Object obj2) {}\n" +
+						"	public void foo(Object obj, Object obj2, Object obj3, X this) {}\n" +
+						"	class Y {\n" +
+						"		Y(Object obj, Y Y.this){}\n" +
+						"	}\n" +
+						"}"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	public void foo(Object obj, X this) {}\n" + 
+				"	                              ^^^^\n" + 
+				"Only the first formal parameter may be declared explicitly as 'this'\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	public void foo(Object obj1, X this, Object obj2) {}\n" + 
+				"	                               ^^^^\n" + 
+				"Only the first formal parameter may be declared explicitly as 'this'\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 4)\n" + 
+				"	public void foo(Object obj, Object obj2, Object obj3, X this) {}\n" + 
+				"	                                                        ^^^^\n" + 
+				"Only the first formal parameter may be declared explicitly as 'this'\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 6)\n" + 
+				"	Y(Object obj, Y Y.this){}\n" + 
+				"	                  ^^^^\n" + 
+				"Only the first formal parameter may be declared explicitly as 'this'\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383913
+	public void test0383913b() {
+		this.runNegativeTest(
+				new String[] {
+						"Outer.java",
+						"public class Outer {\n" +
+						"    Outer(Outer Outer.this) {}\n" +
+						"    Outer(Outer this, int i) {}\n" +
+						"    class Inner<K,V> {\n" +
+						"        class InnerMost<T> {\n" +
+						"            InnerMost(Outer.Inner this) {}\n" +
+						"            InnerMost(Outer.Inner Outer.Inner.this, int i, float f) {}\n" +
+						"            InnerMost(Outer Outer.this, float f) {}\n" +
+						"            InnerMost(Outer.Inner<K,V>.InnerMost<T> Outer.Inner.InnerMost.this) {}\n" +
+						"            InnerMost(Inner<K,V> Outer.Inner.InnerMost.this, int i) {}\n" +
+						"            InnerMost(Outer.Inner<K, V> this, float f) {}\n" +
+						"            InnerMost(Outer.Inner<K,V> Inner.this, long l) {}\n" +
+						"        }\n" +
+						"    }\n" +
+						"}\n"},
+						"----------\n" + 
+						"1. ERROR in Outer.java (at line 2)\n" + 
+						"	Outer(Outer Outer.this) {}\n" + 
+						"	                  ^^^^\n" + 
+						"Explicit 'this' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+						"----------\n" + 
+						"2. ERROR in Outer.java (at line 3)\n" + 
+						"	Outer(Outer this, int i) {}\n" + 
+						"	            ^^^^\n" + 
+						"Explicit 'this' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+						"----------\n" + 
+						"3. WARNING in Outer.java (at line 6)\n" + 
+						"	InnerMost(Outer.Inner this) {}\n" + 
+						"	          ^^^^^^^^^^^\n" + 
+						"Outer.Inner is a raw type. References to generic type Outer.Inner<K,V> should be parameterized\n" + 
+						"----------\n" + 
+						"4. ERROR in Outer.java (at line 6)\n" + 
+						"	InnerMost(Outer.Inner this) {}\n" + 
+						"	          ^^^^^^^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>\n" + 
+						"----------\n" + 
+						"5. ERROR in Outer.java (at line 6)\n" + 
+						"	InnerMost(Outer.Inner this) {}\n" + 
+						"	                      ^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Outer.Inner\n" + 
+						"----------\n" + 
+						"6. WARNING in Outer.java (at line 7)\n" + 
+						"	InnerMost(Outer.Inner Outer.Inner.this, int i, float f) {}\n" + 
+						"	          ^^^^^^^^^^^\n" + 
+						"Outer.Inner is a raw type. References to generic type Outer.Inner<K,V> should be parameterized\n" + 
+						"----------\n" + 
+						"7. ERROR in Outer.java (at line 7)\n" + 
+						"	InnerMost(Outer.Inner Outer.Inner.this, int i, float f) {}\n" + 
+						"	          ^^^^^^^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>\n" + 
+						"----------\n" + 
+						"8. ERROR in Outer.java (at line 8)\n" + 
+						"	InnerMost(Outer Outer.this, float f) {}\n" + 
+						"	          ^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>\n" + 
+						"----------\n" + 
+						"9. ERROR in Outer.java (at line 8)\n" + 
+						"	InnerMost(Outer Outer.this, float f) {}\n" + 
+						"	                      ^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Outer.Inner\n" + 
+						"----------\n" + 
+						"10. ERROR in Outer.java (at line 9)\n" + 
+						"	InnerMost(Outer.Inner<K,V>.InnerMost<T> Outer.Inner.InnerMost.this) {}\n" + 
+						"	          ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>\n" + 
+						"----------\n" + 
+						"11. ERROR in Outer.java (at line 9)\n" + 
+						"	InnerMost(Outer.Inner<K,V>.InnerMost<T> Outer.Inner.InnerMost.this) {}\n" + 
+						"	                                                              ^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Outer.Inner\n" + 
+						"----------\n" + 
+						"12. ERROR in Outer.java (at line 10)\n" + 
+						"	InnerMost(Inner<K,V> Outer.Inner.InnerMost.this, int i) {}\n" + 
+						"	                                           ^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Outer.Inner\n" + 
+						"----------\n" + 
+						"13. ERROR in Outer.java (at line 11)\n" + 
+						"	InnerMost(Outer.Inner<K, V> this, float f) {}\n" + 
+						"	                            ^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Outer.Inner\n" + 
+						"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383913
+	public void test0383913c() {
+		this.runNegativeTest(
+				new String[] {
+						"Outer.java",
+						"public class Outer {\n" +
+						"    class Inner<K,V> {\n" +
+						"        class InnerMost<T> {\n" +
+						"            public void foo(Outer Outer.this) {}\n" +
+						"            public void foo(Inner<K,V> Inner.this, int i) {}\n" +
+						"            public void foo(InnerMost this) {}\n" +
+						"            public void foo(Inner.InnerMost<T> this, Object obj) {}\n" +
+						"            public void foo(InnerMost<T> this, int i) {}\n" +
+						"            public void foo(Inner<K,V>.InnerMost<T> this, long l) {}\n" +
+						"            public void foo(Outer.Inner<K,V>.InnerMost<T> this, float f) {}\n" +
+						"            public void foo(InnerMost<T> Outer.Inner.InnerMost.this, int i, float f) {}\n" +
+						"        }\n" +
+						"    }\n" +
+						"}\n"},
+						"----------\n" + 
+						"1. ERROR in Outer.java (at line 4)\n" + 
+						"	public void foo(Outer Outer.this) {}\n" + 
+						"	                ^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>.InnerMost<T>\n" + 
+						"----------\n" + 
+						"2. ERROR in Outer.java (at line 4)\n" + 
+						"	public void foo(Outer Outer.this) {}\n" + 
+						"	                            ^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Outer.Inner.InnerMost\n" + 
+						"----------\n" + 
+						"3. ERROR in Outer.java (at line 5)\n" + 
+						"	public void foo(Inner<K,V> Inner.this, int i) {}\n" + 
+						"	                ^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>.InnerMost<T>\n" + 
+						"----------\n" + 
+						"4. ERROR in Outer.java (at line 5)\n" + 
+						"	public void foo(Inner<K,V> Inner.this, int i) {}\n" + 
+						"	                                 ^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Outer.Inner.InnerMost\n" + 
+						"----------\n" + 
+						"5. WARNING in Outer.java (at line 6)\n" + 
+						"	public void foo(InnerMost this) {}\n" + 
+						"	                ^^^^^^^^^\n" + 
+						"Outer.Inner.InnerMost is a raw type. References to generic type Outer.Inner<K,V>.InnerMost<T> should be parameterized\n" + 
+						"----------\n" + 
+						"6. ERROR in Outer.java (at line 6)\n" + 
+						"	public void foo(InnerMost this) {}\n" + 
+						"	                ^^^^^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>.InnerMost<T>\n" + 
+						"----------\n" + 
+						"7. ERROR in Outer.java (at line 7)\n" + 
+						"	public void foo(Inner.InnerMost<T> this, Object obj) {}\n" + 
+						"	                ^^^^^^^^^^^^^^^\n" + 
+						"The member type Outer.Inner.InnerMost<T> must be qualified with a parameterized type, since it is not static\n" + 
+						"----------\n" + 
+						"8. ERROR in Outer.java (at line 7)\n" + 
+						"	public void foo(Inner.InnerMost<T> this, Object obj) {}\n" + 
+						"	                ^^^^^^^^^^^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>.InnerMost<T>\n" + 
+						"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383913
+	public void test0383913d() {
+		this.runNegativeTest(
+				new String[] {
+						"Outer.java",
+						"public class Outer {\n" +
+						"    class Inner<K,V> {\n" +
+						"		public Inner(@Missing Outer Outer.this) {}\n" +
+						"        class InnerMost<T> {\n" +
+						"            public void bar() {\n" +
+						"                new AnonymousInner() {\n" +
+						"                    public void foobar(AnonymousInner this) {}\n" +
+						"                };\n" +
+						"            }\n" +
+						"            void bar(int i) {\n" +
+						"                class Local {\n" +
+						"                    public int hashCode(Local this) { return 0; }\n" +
+						"                    public int hashCode(Outer.Local this) { return 0; }\n" +
+						"                }\n" +
+						"            }\n" +
+						"        }\n" +
+						"    }\n" +
+						"    static class StaticNested {\n" +
+						"        public StaticNested(@Marker Outer.StaticNested Outer.StaticNested.this) {}\n" +
+						"    }\n" +
+						"    public static void foo(@Marker Outer this) {}\n" +
+						"    public void foo(@Missing Outer this, int i) {}\n" +
+						"}\n" +
+						"interface AnonymousInner {\n" +
+						"    public void foobar(AnonymousInner this);\n" +
+						"}\n" +
+						"@interface Marker {}"},
+							"----------\n" + 
+							"1. ERROR in Outer.java (at line 3)\n" + 
+							"	public Inner(@Missing Outer Outer.this) {}\n" + 
+							"	              ^^^^^^^\n" + 
+							"Missing cannot be resolved to a type\n" + 
+							"----------\n" + 
+							"2. ERROR in Outer.java (at line 7)\n" + 
+							"	public void foobar(AnonymousInner this) {}\n" + 
+							"	                                  ^^^^\n" + 
+							"Explicit 'this' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+							"----------\n" + 
+							"3. ERROR in Outer.java (at line 13)\n" + 
+							"	public int hashCode(Outer.Local this) { return 0; }\n" + 
+							"	                    ^^^^^^^^^^^\n" + 
+							"Outer.Local cannot be resolved to a type\n" + 
+							"----------\n" + 
+							"4. ERROR in Outer.java (at line 19)\n" + 
+							"	public StaticNested(@Marker Outer.StaticNested Outer.StaticNested.this) {}\n" + 
+							"	                                                                  ^^^^\n" + 
+							"Explicit 'this' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+							"----------\n" + 
+							"5. ERROR in Outer.java (at line 21)\n" + 
+							"	public static void foo(@Marker Outer this) {}\n" + 
+							"	                                     ^^^^\n" + 
+							"Explicit 'this' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+							"----------\n" + 
+							"6. ERROR in Outer.java (at line 22)\n" + 
+							"	public void foo(@Missing Outer this, int i) {}\n" + 
+							"	                 ^^^^^^^\n" + 
+							"Missing cannot be resolved to a type\n" + 
+							"----------\n");
+	}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RunAllJava8Tests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RunAllJava8Tests.java
new file mode 100644
index 0000000..ea94a5c
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RunAllJava8Tests.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jdt.core.tests.compiler.parser.ComplianceDiagnoseTest;
+import org.eclipse.jdt.core.tests.compiler.parser.LambdaExpressionSyntaxTest;
+import org.eclipse.jdt.core.tests.compiler.parser.ReferenceExpressionSyntaxTest;
+import org.eclipse.jdt.core.tests.compiler.parser.TypeAnnotationSyntaxTest;
+
+public class RunAllJava8Tests extends TestCase {
+	
+	public RunAllJava8Tests(String name) {
+		super(name);
+	}
+	public static Class[] getAllTestClasses() {
+		return new Class[] {
+			LambdaExpressionSyntaxTest.class,
+			NegativeLambdaExpressionsTest.class,
+			NegativeTypeAnnotationTest.class,
+			TypeAnnotationSyntaxTest.class,
+			ReferenceExpressionSyntaxTest.class,
+			DefaultMethodsTest.class,
+			ComplianceDiagnoseTest.class,
+		};
+	}
+	public static Test suite() {
+		TestSuite ts = new TestSuite(RunAllJava8Tests.class.getName());
+
+		Class[] testClasses = getAllTestClasses();
+		for (int i = 0; i < testClasses.length; i++) {
+			Class testClass = testClasses[i];
+			// call the suite() method and add the resulting suite to the suite
+			try {
+				Method suiteMethod = testClass.getDeclaredMethod("suite", new Class[0]); //$NON-NLS-1$
+				Test suite = (Test)suiteMethod.invoke(null, new Object[0]);
+				ts.addTest(suite);
+			} catch (IllegalAccessException e) {
+				e.printStackTrace();
+			} catch (InvocationTargetException e) {
+				e.getTargetException().printStackTrace();
+			} catch (NoSuchMethodException e) {
+				e.printStackTrace();
+			}
+		}
+		return ts;
+	}
+}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
index faf76d4..71c0745 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
@@ -2416,13 +2416,14 @@
 	this.expressionLengthPtr--;
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
@@ -2457,13 +2458,14 @@
 
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
@@ -2496,13 +2498,14 @@
 	this.expressionLengthPtr--;
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
@@ -2536,13 +2539,14 @@
 	
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
index 6b6f798..a80db15 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
@@ -1299,7 +1299,7 @@
 	/** @since 3.9 */
     int InvalidUsageOfTypeAnnotations = Syntax + Internal + 637;
     /** @since 3.9 */
-    int InvalidUsageOfReceiverAnnotations = Syntax + Internal + 638;
+    int DisallowedExplicitThisParameter = Syntax + Internal + 638;
     /** @since 3.9 */
     int MisplacedTypeAnnotations = Syntax + Internal + 639;
     /** @since 3.9 */
@@ -1322,6 +1322,10 @@
     int ExplicitThisParameterNotInLambda = Internal + Syntax + 648;
     /** @since 3.9 */
     int ExplicitAnnotationTargetRequired = TypeRelated + 649;
+    /** @since 3.9 */
+    int IllegalTypeForExplicitThis = Internal + Syntax + 650;
+    /** @since 3.9 */
+    int IllegalQualifierForExplicitThis = Internal + Syntax + 651;
     
 	/**
 	 * More problems in generics
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
index b769a69..97db77b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
@@ -643,6 +643,15 @@
 	}
 // Markus Witte+SH}
 
+	public static void resolveAnnotations(BlockScope scope, Annotation[][] sourceAnnotations, Binding recipient) {
+		int annotationsLevels = sourceAnnotations == null ? 0 : sourceAnnotations.length;
+		for (int i = 0; i < annotationsLevels; i++) {
+			if (sourceAnnotations[i] != null) {
+				resolveAnnotations(scope, sourceAnnotations[i], recipient);
+			}
+		}
+	}
+
 	/**
 	 * Resolve annotations, and check duplicates, answers combined tagBits
 	 * for recognized standard annotations
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
index ccaac41..a0b2882 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
@@ -769,18 +769,13 @@
 
 		try {
 			bindArguments();
+			resolveReceiver();
 			bindThrownExceptions();
 //{ObjectTeams: no javadoc in generated / copied methods
 		  if (!(this.isGenerated || this.isCopied))
 // SH}
 			resolveJavadoc();
 			resolveAnnotations(this.scope, this.annotations, this.binding);
-			// jsr308
-			if (this.receiverAnnotations != null && this.scope.isStatic) {
-				int last = this.receiverAnnotations.length - 1;
-				this.scope.problemReporter().illegalReceiverAnnotations(this.receiverAnnotations[0],
-						                                                this.receiverAnnotations[last]);
-			}
 			// jsr 308
 			resolveAnnotations(this.scope, this.receiverAnnotations, new Annotation.TypeUseBinding(Binding.TYPE_USE));
 			validateNullAnnotations();
@@ -798,6 +793,52 @@
 		}
 	}
 
+	public void resolveReceiver() {
+		if (this.arguments != null && this.arguments.length > 0) {
+			if (this.arguments[0].isReceiver()) {
+				Receiver receiver = (Receiver) this.arguments[0];
+
+				TypeBinding resolvedReceiverType = receiver.type.resolvedType;
+				if (this.binding == null || resolvedReceiverType == null || !resolvedReceiverType.isValidBinding())
+					return;
+
+				ReferenceBinding declaringClass = this.binding.declaringClass;
+				/* neither static methods nor methods in anonymous types can have explicit 'this' */
+				if (this.isStatic() || declaringClass.isAnonymousType()) {
+					this.scope.problemReporter().disallowedThisParameter(receiver);
+					return; // No need to do further validation
+				}
+
+				ReferenceBinding enclosingReceiver = this.scope.enclosingReceiverType();
+				if (this.isConstructor()) {
+					/* Only non static member types or local types can declare explicit 'this' params in constructors */
+					if (declaringClass.isStatic()
+							|| (declaringClass.tagBits & (TagBits.IsLocalType | TagBits.IsMemberType)) == 0) { /* neither member nor local type */
+						this.scope.problemReporter().disallowedThisParameter(receiver);
+						return; // No need to do further validation
+					}
+					enclosingReceiver = enclosingReceiver.enclosingType();
+				}
+
+				if (enclosingReceiver != resolvedReceiverType) {
+					this.scope.problemReporter().illegalTypeForExplicitThis(receiver, enclosingReceiver);
+				}
+
+				if ((receiver.qualifyingName == null) ? this.isConstructor() : !isQualifierValidForType(receiver.qualifyingName.getName(), enclosingReceiver)) {
+					this.scope.problemReporter().illegalQualifierForExplicitThis(receiver, enclosingReceiver);					
+				}
+			}
+		}
+	}
+	private boolean isQualifierValidForType(char[][] tokens, TypeBinding enclosingType) {
+		for(int index = tokens.length - 1; index >= 0 && enclosingType != null; index--) {
+			if (!CharOperation.equals(enclosingType.sourceName(), tokens[index])) {
+				return false;
+			}
+			enclosingType = enclosingType.enclosingType();
+		}
+		return true;
+	}
 	public void resolveJavadoc() {
 
 		if (this.binding == null) return;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
index 79a0c3b..b14573e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
@@ -87,14 +87,16 @@
 						this.currentIndexes.push(new Integer(((Integer) this.currentIndexes.pop()).intValue() + 1));
 					}
 				}
-				Annotation[] annotations = typeReference.annotations;
+				Annotation[][] annotations = typeReference.annotations;
 				if (annotations == null) {
-					annotations = primaryAnnotation;
+					annotations = new Annotation[][] { primaryAnnotation };
 				}
-				if (annotations != null) {
-					for (int i = 0; i < annotations.length; i++) {
-						Annotation current = annotations[i];
-						if (current == this.currentAnnotation) {
+				int annotationsLevels = annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					Annotation [] current = annotations[i];
+					int annotationsLength = current == null ? 0 : current.length;
+					for (int j = 0; j < annotationsLength; j++) {
+						if (current[j] == this.currentAnnotation) {
 							this.search = false;
 							return false;
 						}
@@ -134,14 +136,16 @@
 						this.currentIndexes.push(new Integer(((Integer) this.currentIndexes.pop()).intValue() + 1));
 					}
 				}
-				Annotation[] annotations = typeReference.annotations;
+				Annotation[][] annotations = typeReference.annotations;
 				if (annotations == null) {
-					annotations = primaryAnnotation;
+					annotations = new Annotation[][] { primaryAnnotation };
 				}
-				if (annotations != null) {
-					for (int i = 0; i < annotations.length; i++) {
-						Annotation current = annotations[i];
-						if (current == this.currentAnnotation) {
+				int annotationsLevels = annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					Annotation [] current = annotations[i];
+					int annotationsLength = current == null ? 0 : current.length;
+					for (int j = 0; j < annotationsLength; j++) {
+						if (current[j] == this.currentAnnotation) {
 							this.search = false;
 							return false;
 						}
@@ -181,14 +185,16 @@
 						this.currentIndexes.push(new Integer(((Integer) this.currentIndexes.pop()).intValue() + 1));
 					}
 				}
-				Annotation[] annotations = typeReference.annotations;
+				Annotation[][] annotations = typeReference.annotations;
 				if (annotations == null) {
-					annotations = primaryAnnotation;
+					annotations = new Annotation[][] { primaryAnnotation };
 				}
-				if (annotations != null) {
-					for (int i = 0; i < annotations.length; i++) {
-						Annotation current = annotations[i];
-						if (current == this.currentAnnotation) {
+				int annotationsLevels = annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					Annotation [] current = annotations[i];
+					int annotationsLength = current == null ? 0 : current.length;
+					for (int j = 0; j < annotationsLength; j++) {
+						if (current[j] == this.currentAnnotation) {
 							this.search = false;
 							return false;
 						}
@@ -235,14 +241,16 @@
 						this.currentIndexes.push(new Integer(((Integer) this.currentIndexes.pop()).intValue() + 1));
 					}
 				}
-				Annotation[] annotations = typeReference.annotations;
+				Annotation[][] annotations = typeReference.annotations;
 				if (annotations == null) {
-					annotations = primaryAnnotation;
+					annotations = new Annotation[][] { primaryAnnotation };
 				}
-				if (annotations != null) {
-					for (int i = 0; i < annotations.length; i++) {
-						Annotation current = annotations[i];
-						if (current == this.currentAnnotation) {
+				int annotationsLevels = annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					Annotation [] current = annotations[i];
+					int annotationsLength = current == null ? 0 : current.length;
+					for (int j = 0; j < annotationsLength; j++) {
+						if (current[j] == this.currentAnnotation) {
 							this.search = false;
 							return false;
 						}
@@ -290,11 +298,13 @@
 						this.currentIndexes.push(new Integer(((Integer) this.currentIndexes.pop()).intValue() + 1));
 					}
 				}
-				Annotation[] annotations = typeReference.annotations;
-				if (annotations != null) {
-					for (int i = 0; i < annotations.length; i++) {
-						Annotation current = annotations[i];
-						if (current == this.currentAnnotation) {
+				Annotation[][] annotations = typeReference.annotations;
+				int annotationsLevels = annotations == null ? 0 : annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					Annotation [] current = annotations[i];
+					int annotationsLength = current == null ? 0 : current.length;
+					for (int j = 0; j < annotationsLength; j++) {
+						if (current[j] == this.currentAnnotation) {
 							this.search = false;
 							return false;
 						}
@@ -310,11 +320,13 @@
 			}
 			public boolean visit(QualifiedTypeReference typeReference, BlockScope scope) {
 				if (!this.search) return false;
-				Annotation[] annotations = typeReference.annotations;
-				if (annotations != null) {
-					for (int i = 0; i < annotations.length; i++) {
-						Annotation current = annotations[i];
-						if (current == this.currentAnnotation) {
+				Annotation[][] annotations = typeReference.annotations;
+				int annotationsLevels = annotations == null ? 0 : annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					Annotation [] current = annotations[i];
+					int annotationsLength = current == null ? 0 : current.length;
+					for (int j = 0; j < annotationsLength; j++) {
+						if (current[j] == this.currentAnnotation) {
 							this.search = false;
 							return false;
 						}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
index 09ae845..6bea210 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
@@ -143,9 +143,12 @@
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 			if (this.annotationsOnDimensions != null) {
 				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
@@ -163,9 +166,12 @@
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 			if (this.annotationsOnDimensions != null) {
 				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
index 18f9ce8..a233368 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
@@ -117,9 +117,12 @@
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 			if (this.annotationsOnDimensions != null) {
 				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
@@ -139,9 +142,12 @@
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 			if (this.annotationsOnDimensions != null) {
 				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
index e3d72a2..4237d44 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
@@ -390,7 +390,7 @@
 		// only resolve annotation at the end, for constant to be positioned before (96991)
 		resolveAnnotations(scope, this.annotations, this.binding);
 		// jsr 308
-		Annotation[] typeAnnotations = this.type.annotations;
+		Annotation[][] typeAnnotations = this.type.annotations;
 		if (typeAnnotations != null) {
 			ASTNode.resolveAnnotations(scope, typeAnnotations, new Annotation.TypeUseBinding(Binding.TYPE_USE));
 		}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
index ada970b..de9f915 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
@@ -4,7 +4,10 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * $Id: NameReference.java 19881 2009-04-13 23:35:46Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -106,6 +109,8 @@
 
 public abstract String unboundReferenceErrorName();
 
+public abstract char[][] getName();
+
 //{ObjectTeams: hook after this reference has been fully resolved
 public void resolveFinished() { /* noop  */ }
 // SH}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
index 081fec2..7d04018 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
@@ -348,13 +348,13 @@
 	}
 
 	public StringBuffer printExpression(int indent, StringBuffer output) {
-		if (this.annotations != null) {
-			output.append(" "); //$NON-NLS-1$
-			printAnnotations(this.annotations, output);
-			output.append(' ');
-		}
 		int length = this.tokens.length;
 		for (int i = 0; i < length - 1; i++) {
+			if (this.annotations != null && this.annotations[i] != null) {
+				output.append(" "); //$NON-NLS-1$
+				printAnnotations(this.annotations[i], output);
+				output.append(' ');
+			}
 			output.append(this.tokens[i]);
 			TypeReference[] typeArgument = this.typeArguments[i];
 			if (typeArgument != null) {
@@ -372,6 +372,11 @@
 			}
 			output.append('.');
 		}
+		if (this.annotations != null && this.annotations[length - 1] != null) {
+			output.append(" "); //$NON-NLS-1$
+			printAnnotations(this.annotations[length - 1], output);
+			output.append(' ');
+		}
 		output.append(this.tokens[length - 1]);
 		TypeReference[] typeArgument = this.typeArguments[length - 1];
 		if (typeArgument != null) {
@@ -424,9 +429,12 @@
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 			if (this.annotationsOnDimensions != null) {
 				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
@@ -451,9 +459,12 @@
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 			if (this.annotationsOnDimensions != null) {
 				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
index 59b8733..ad7f074 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
@@ -440,8 +440,8 @@
 	}
 
 	public StringBuffer printExpression(int indent, StringBuffer output){
-		if (this.annotations != null) {
-			printAnnotations(this.annotations, output);
+		if (this.annotations != null && this.annotations[0] != null) {
+			printAnnotations(this.annotations[0], output);
 			output.append(' ');
 		}
 		output.append(this.token);
@@ -570,9 +570,12 @@
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 			if (this.annotationsOnDimensions != null) {
 				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
@@ -595,9 +598,12 @@
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 			if (this.annotationsOnDimensions != null) {
 				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
index b3ad19b..25b0c5e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
@@ -4,7 +4,10 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * $Id: QualifiedNameReference.java 23405 2010-02-03 17:02:18Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -1298,4 +1301,8 @@
 public String unboundReferenceErrorName() {
 	return new String(this.tokens[0]);
 }
+
+public char[][] getName() {
+	return this.tokens;
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
index 90a73ca..19fb508 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
@@ -231,12 +231,12 @@
 	}
 
 	public StringBuffer printExpression(int indent, StringBuffer output) {
-		if (this.annotations != null) {
-			printAnnotations(this.annotations, output);
-			output.append(' ');
-		}
 		for (int i = 0; i < this.tokens.length; i++) {
 			if (i > 0) output.append('.');
+			if (this.annotations != null && this.annotations[i] != null) {
+				printAnnotations(this.annotations[i], output);
+				output.append(' ');
+			}
 //{ObjectTeams: suppress prefix:
 		  if (CharOperation.equals(this.tokens[i], IOTConstants._OT_BASE))
 			output.append(IOTConstants.BASE);
@@ -250,9 +250,12 @@
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 		}
 		visitor.endVisit(this, scope);
@@ -261,11 +264,17 @@
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 		}
 		visitor.endVisit(this, scope);
 	}
+	public int getAnnotatableLevels() {
+		return this.tokens.length;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
index e6d7ea4..2315e60 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
@@ -4,7 +4,10 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * $Id: SingleNameReference.java 23404 2010-02-03 14:10:22Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -1077,4 +1080,8 @@
 public String unboundReferenceErrorName(){
 	return new String(this.token);
 }
+
+public char[][] getName() {
+	return new char[][] {this.token};
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
index 8352c86..809c51e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
@@ -79,8 +79,8 @@
 	}
 
 	public StringBuffer printExpression(int indent, StringBuffer output){
-		if (this.annotations != null) {
-			printAnnotations(this.annotations, output);
+		if (this.annotations != null && this.annotations[0] != null) {
+			printAnnotations(this.annotations[0], output);
 			output.append(' ');
 		}
 		return output.append(this.token);
@@ -153,9 +153,12 @@
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 		}
 		visitor.endVisit(this, scope);
@@ -164,9 +167,12 @@
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
 		if (visitor.visit(this, scope)) {
 			if (this.annotations != null) {
-				int annotationsLength = this.annotations.length;
-				for (int i = 0; i < annotationsLength; i++)
-					this.annotations[i].traverse(visitor, scope);
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
 			}
 		}
 		visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
index 6bac200..04328fd 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
@@ -318,7 +318,7 @@
 }
 
 // JSR308 type annotations...
-public Annotation[] annotations = null;
+public Annotation[][] annotations = null;
 
 // allows us to trap completion & selection nodes
 public void aboutToResolve(Scope scope) {
@@ -677,4 +677,7 @@
 		resolveAnnotations(scope, this.annotations, new Annotation.TypeUseBinding(Binding.TYPE_USE));
 	}
 }
+public int getAnnotatableLevels() {
+	return 1;
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
index 97f2981..b771982 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
@@ -446,9 +446,9 @@
 	Argument[] argTypes = method.arguments;
 	int argLength = argTypes == null ? 0 : argTypes.length;
 	long sourceLevel = compilerOptions().sourceLevel;
-	if (argLength > 0 && sourceLevel >= ClassFileConstants.JDK1_5) {
+	if (argLength > 0) {
 		Argument argument = argTypes[--argLength];
-		if (argument.isVarArgs())
+		if (argument.isVarArgs() && sourceLevel >= ClassFileConstants.JDK1_5)
 			method.binding.modifiers |= ClassFileConstants.AccVarargs;
 		if (CharOperation.equals(argument.name, ConstantPool.This)) {
 			if (argLength != 0 || sourceLevel <= ClassFileConstants.JDK1_7) {
@@ -461,7 +461,7 @@
 		}
 		while (--argLength >= 0) {
 			argument = argTypes[argLength];
-			if (argument.isVarArgs())
+			if (argument.isVarArgs() && sourceLevel >= ClassFileConstants.JDK1_5)
 				problemReporter().illegalVararg(argument, method);
 			if (CharOperation.equals(argument.name, ConstantPool.This)) {
 				if (argLength != 0 || sourceLevel <= ClassFileConstants.JDK1_7) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index b88effe..0a43e78 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -1395,13 +1395,14 @@
 	ParameterizedQualifiedTypeReference typeRef = new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, annotationsOnDimensions, positions);
 	int length;
 	if (this.typeAnnotationLengthPtr >= 0 && (length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+		typeRef.annotations = new Annotation[tokensSize][];
 		System.arraycopy(
 			this.typeAnnotationStack,
 			(this.typeAnnotationPtr -= length) + 1,
-			typeRef.annotations = new Annotation[length],
+			typeRef.annotations[0] = new Annotation[length],
 			0,
 			length);
-		typeRef.sourceStart = typeRef.annotations[0].sourceStart;
+		typeRef.sourceStart = typeRef.annotations[0][0].sourceStart;
 		typeRef.bits |= ASTNode.HasTypeAnnotations;
 	}
 	return typeRef;
@@ -2929,13 +2930,14 @@
 	
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
@@ -2983,13 +2985,14 @@
 
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
@@ -3040,13 +3043,14 @@
 
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
@@ -3092,13 +3096,14 @@
 	TypeReference typeReference = getTypeReference(this.intStack[this.intPtr--]);
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
@@ -3149,13 +3154,14 @@
 	this.intPtr--;
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
@@ -10248,13 +10254,14 @@
 	type = getUnannotatedTypeReference(isArray ? this.intStack[this.intPtr--] : 0);
     // and attach the annotations now.
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		type.annotations = new Annotation[type.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				type.annotations = new Annotation[length],
+				type.annotations[0] = new Annotation[length],
 				0,
 				length);
-		type.sourceStart = type.annotations[0].sourceStart;
+		type.sourceStart = type.annotations[0][0].sourceStart;
 		type.bits |= ASTNode.HasTypeAnnotations;
 	}
 	if (illegalModifiersSourceStart >= 0 && illegalModifiersSourceStart < type.sourceStart) {
@@ -10409,13 +10416,14 @@
 
 	// Prefix annotations if any are on the expression stack, attach them now.
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		type.annotations = new Annotation[type.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				type.annotations = new Annotation[length],
+				type.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int annotStart = type.annotations[0].sourceStart;
+		int annotStart = type.annotations[0][0].sourceStart;
 		if (annotStart < type.sourceStart) {
 			type.sourceStart = annotStart;
 		}
@@ -11496,13 +11504,14 @@
 	// copy from expression stack to type annotation stack
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
@@ -11529,13 +11538,14 @@
 	// copy from expression stack to type annotation stack
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		typeReference.annotations = new Annotation[typeReference.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.expressionStack,
 				(this.expressionPtr -= length) + 1,
-				typeReference.annotations = new Annotation[length],
+				typeReference.annotations[0] = new Annotation[length],
 				0,
 				length);
-		int typeReferenceSourceStart = typeReference.annotations[0].sourceStart;
+		int typeReferenceSourceStart = typeReference.annotations[0][0].sourceStart;
 		if (this.modifiersSourceStart < typeReferenceSourceStart) {
 			typeReferenceSourceStart = this.modifiersSourceStart;
 		}
@@ -12706,14 +12716,14 @@
 	if (this.typeAnnotationLengthPtr >= 0
 			&& (length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
 		//	if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
-
+		ref.annotations = new Annotation[ref.getAnnotatableLevels()][];
 		System.arraycopy(
 				this.typeAnnotationStack,
 				(this.typeAnnotationPtr -= length) + 1,
-				ref.annotations = new Annotation[length],
+				ref.annotations[0] = new Annotation[length],
 				0,
 				length);
-		ref.sourceStart = ref.annotations[0].sourceStart;
+		ref.sourceStart = ref.annotations[0][0].sourceStart;
 		ref.bits |= ASTNode.HasTypeAnnotations;
 	}
 	return ref;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index 907010a..388052f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -90,6 +90,7 @@
 import org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.Receiver;
 import org.eclipse.jdt.internal.compiler.ast.Reference;
 import org.eclipse.jdt.internal.compiler.ast.ReferenceExpression;
 import org.eclipse.jdt.internal.compiler.ast.ReturnStatement;
@@ -2961,6 +2962,31 @@
 		argument.sourceStart,
 		argument.sourceEnd);
 }
+public void disallowedThisParameter(Receiver receiver) {
+	String[] arguments = NoArgument;
+	this.handle(
+		IProblem.DisallowedExplicitThisParameter,
+		arguments,
+		arguments,
+		receiver.sourceStart,
+		receiver.sourceEnd);
+}
+public void illegalQualifierForExplicitThis(Receiver receiver, TypeBinding expectedType) {
+	this.handle(
+		IProblem.IllegalQualifierForExplicitThis,
+		new String[] { new String(expectedType.readableName())},
+		new String[] { new String(expectedType.qualifiedSourceName())},
+		receiver.sourceStart,
+		receiver.sourceEnd);
+}
+public void illegalTypeForExplicitThis(Receiver receiver, TypeBinding expectedType) {
+	this.handle(
+		IProblem.IllegalTypeForExplicitThis,
+		new String[] { new String(expectedType.readableName())},
+		new String[] { new String(expectedType.shortReadableName())},
+		receiver.type.sourceStart,
+		receiver.type.sourceEnd);
+}
 public void illegalThis(Argument argument) {
 	String[] arguments = NoArgument;
 	this.handle(
@@ -4818,15 +4844,6 @@
 			annotation.sourceEnd);
 }
 
-public void illegalReceiverAnnotations(Annotation first, Annotation last) {
-	this.handle(
-			IProblem.InvalidUsageOfReceiverAnnotations,
-			NoArgument,
-			NoArgument,
-			first.sourceStart,
-			last.sourceEnd);	
-}
-
 public void misplacedTypeAnnotations(Annotation first, Annotation last) {
 	this.handle(
 			IProblem.MisplacedTypeAnnotations,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
index a319bce..01e504d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
@@ -590,18 +590,20 @@
 635 = Unnecessary @SuppressWarnings("{0}")
 636 = The method {0}({1}) of type {2} should be tagged with @Override since it actually overrides a superinterface method
 637 = Syntax error, type annotations are available only when source level is at least 1.8
-638 = Receiver annotations are illegal in a static method context
+638 = Explicit ''this'' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors
 639 = Syntax error, type annotations are illegal here
 640 = Syntax error, modifiers are illegal here
 641 = Type annotation is illegal for a method that returns void
-642 = Only the first formal parameter of an instance method may be declared explicitly as "this" 
-643 = Explicit declaration of "this" parameter is allowed only at source level 1.8 or above 
+642 = Only the first formal parameter may be declared explicitly as ''this''
+643 = Explicit declaration of ''this'' parameter is allowed only at source level 1.8 or above
 644 = Default methods are allowed only at source level 1.8 or above
 645 = Lambda expressions are allowed only at source level 1.8 or above
 646 = Method references are allowed only at source level 1.8 or above
 647 = Constructor references are allowed only at source level 1.8 or above
 648 = Lambda expressions cannot declare a this parameter
 649 = Only annotation types that explicitly specify {0} as a possible target element type can be applied here
+650 = The declared type of the explicit ''this'' parameter is expected to be {0}
+651 = The explicit ''this'' parameter is expected to be qualified with {0}
 ### MORE GENERICS
 660 = Unused type arguments for the non generic constructor {0}({1}) of type {2}; it should not be parameterized with arguments <{3}>
 
diff --git a/othersrc/JCLMin1.5/.gitignore b/othersrc/JCLMin1.5/.gitignore
new file mode 100644
index 0000000..5e56e04
--- /dev/null
+++ b/othersrc/JCLMin1.5/.gitignore
@@ -0,0 +1 @@
+/bin
diff --git a/plugins/org.eclipse.objectteams.runtime/.gitignore b/plugins/org.eclipse.objectteams.runtime/.gitignore
new file mode 100644
index 0000000..d6e238c
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.runtime/.gitignore
@@ -0,0 +1 @@
+/bcelpatchbin