Add FunctionTypeBuilder.INEXISTENT_PARAM to the "functionParams"
DiagnostcGroup
This allows reporting errors on code like:
/**
* {number} foo
* {string} bar
*/
function hello(name) {
alert('Hello, ' + name);
}
hello('123');
Fixes on GitHub.
@@ -543,7 +543,9 @@ public class DiagnosticGroups {
public static final DiagnosticGroup FUNCTION_PARAMS =
DiagnosticGroups.registerGroup(
- "functionParams", FunctionTypeBuilder.OPTIONAL_ARG_AT_END);
+ "functionParams",
+ FunctionTypeBuilder.INEXISTENT_PARAM,
+ FunctionTypeBuilder.OPTIONAL_ARG_AT_END);
public static final DiagnosticGroup DEPRECATED_ANNOTATIONS =
DiagnosticGroups.registerGroup("deprecatedAnnotations",
