Improve the error message for misplaced annotations on function declarations.
@@ -254,8 +254,10 @@ final class CheckJSDoc extends AbstractPostOrderCallback implements HotSwapCompi
&& !isClassDecl(n)
&& !info.containsFunctionDeclaration()) {
if (getFunctionDecl(n) != null) {
- reportMisplaced(n, "template",
- "The template variable is unused."
+ reportMisplaced(
+ n,
+ "template",
+ "The template variable is unused in the function signature."
+ " Please remove the @template annotation.");
} else {
reportMisplaced(n, "template",
