You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@fxOne thanks. It's not the rule itself, it looks like our type model associates the getter to a FunctionType because accessors declarations are a special case of function declaration, but upon use they don't behave like functions : invoking this.callback does not return the get callback() {...} function as any other unparenthesized call to a method would, but rather the value returned by get callback() {}.
The type model does not reflect this peculiarity.
I want to report a bug.
SonarJS version: 2.21 (build 4409)
SonarQube version: 6.3.1 (build 21392)
Rule key: javascript:S930
Reproducer
I'm getting the error:
"callback" expects 0 arguments, but 1 was provided.
Expected behavior
There shouldn't be any error as the callback getter can return a function.
The text was updated successfully, but these errors were encountered: