diff -r ca9459361300 src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Mon Nov 26 12:16:23 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Mon Nov 26 18:10:48 2018 +0530
@@ -169,9 +169,12 @@
 
     /**
      * Determine whether an annotation is a declaration annotation,
-     * a type annotation, or both.
+     * a type annotation, or both (or none, i.e a non-annotation masquerading as one).
      */
     public AnnotationType annotationTargetType(Attribute.Compound a, Symbol s) {
+        if (!a.type.tsym.isAnnotationType()) {
+            return AnnotationType.NONE;
+        }
         List<Attribute> targets = annotationTargets(a.type.tsym);
         return (targets == null) ?
                 AnnotationType.DECLARATION :
@@ -319,6 +322,8 @@
                         onlyTypeAnnos.append(ta);
                         break;
                     }
+                    case NONE: // Error signaled already, just drop the non-annotation.
+                        break;
                 }
             }
 
diff -r ca9459361300 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Mon Nov 26 12:16:23 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Mon Nov 26 18:10:48 2018 +0530
@@ -344,17 +344,19 @@
 
             Assert.checkNonNull(c, "Failed to create annotation");
 
-            if (annotated.containsKey(a.type.tsym)) {
-                if (!allowRepeatedAnnos) {
-                    log.error(DiagnosticFlag.SOURCE_LEVEL, a.pos(), Feature.REPEATED_ANNOTATIONS.error(sourceName));
+            if (a.type.tsym.isAnnotationType()) {
+                if (annotated.containsKey(a.type.tsym)) {
+                    if (!allowRepeatedAnnos) {
+                        log.error(DiagnosticFlag.SOURCE_LEVEL, a.pos(), Feature.REPEATED_ANNOTATIONS.error(sourceName));
+                    }
+                    ListBuffer<T> l = annotated.get(a.type.tsym);
+                    l = l.append(c);
+                    annotated.put(a.type.tsym, l);
+                    pos.put(c, a.pos());
+                } else {
+                    annotated.put(a.type.tsym, ListBuffer.of(c));
+                    pos.put(c, a.pos());
                 }
-                ListBuffer<T> l = annotated.get(a.type.tsym);
-                l = l.append(c);
-                annotated.put(a.type.tsym, l);
-                pos.put(c, a.pos());
-            } else {
-                annotated.put(a.type.tsym, ListBuffer.of(c));
-                pos.put(c, a.pos());
             }
 
             // Note: @Deprecated has no effect on local variables and parameters
diff -r ca9459361300 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Mon Nov 26 12:16:23 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Mon Nov 26 18:10:48 2018 +0530
@@ -2749,7 +2749,7 @@
         class AnnotationValidator extends TreeScanner {
             @Override
             public void visitAnnotation(JCAnnotation tree) {
-                if (!tree.type.isErroneous()) {
+                if (!tree.type.isErroneous() && tree.type.tsym.isAnnotationType()) {
                     super.visitAnnotation(tree);
                     validateAnnotation(tree);
                 }
diff -r ca9459361300 test/langtools/tools/javac/annotations/AtNonAnnotationTypeTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/annotations/AtNonAnnotationTypeTest.java	Mon Nov 26 18:10:48 2018 +0530
@@ -0,0 +1,11 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8206325
+ * @summary AssertionError in TypeSymbol.getAnnotationTypeMetadata
+ * @compile/fail/ref=AtNonAnnotationTypeTest.out -XDrawDiagnostics -XDdev AtNonAnnotationTypeTest.java
+ */
+
+import java.lang.annotation.Annotation;
+class AtNonAnnotationTypeTest<Override extends Annotation> {
+  AtNonAnnotationTypeTest(@Override String foo) {}
+}
\ No newline at end of file
diff -r ca9459361300 test/langtools/tools/javac/annotations/AtNonAnnotationTypeTest.out
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/annotations/AtNonAnnotationTypeTest.out	Mon Nov 26 18:10:48 2018 +0530
@@ -0,0 +1,2 @@
+AtNonAnnotationTypeTest.java:10:28: compiler.err.not.annotation.type: Override
+1 error
\ No newline at end of file
