/*** @name Conflicting function declarations* @description If two functions with the same name are declared in the same scope, one of the declarations* overrides the other without warning. This makes the code hard to read and maintain, and* may even lead to platform-dependent behavior.* @kind problem* @problem.severity error* @id js/function-declaration-conflict* @tags quality* reliability* correctness* external/cwe/cwe-563* @precision high*/import javascriptfrom FunctionDeclStmt f, FunctionDeclStmt gwheref.getVariable() = g.getVariable() and// ignore global functions; conflicts across scripts are usually false positivesnot f.getVariable().isGlobal() and// only report each pair oncef.getLocation().startsBefore(g.getLocation()) and// ignore ambient, abstract, and overloaded declarations in TypeScriptf.hasBody() andg.hasBody()select f.getIdentifier(),"Declaration of " + f.describe() + " conflicts with $@ in the same scope.", g.getIdentifier(),"another declaration"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。