== Why is this an issue?

Call a non-callable symbol will result in a TypeError at execution.


=== Noncompliant code example

[source,javascript]
----
function foo(a) {
  return a * 2;
}
// ....
var foo = 1;
// ...
foo();   // foo is 1 => TypeError
----


ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

=== duplicates: S2873

=== on 27 Apr 2015, 13:27:08 Linda Martin wrote:
\[~ann.campbell.2] Assign for completion.



=== on 28 Apr 2015, 14:28:56 Ann Campbell wrote:
\[~linda.martin] isn't RSPEC-2873 a sub-type of this rule?

=== on 29 Apr 2015, 09:07:09 Linda Martin wrote:
\[~ann.campbell.2] I have a doubt, maybe we could have a rule checking "unchecked TypeError", or "inappropriate property access or method call" ? (I would prefer the last one) So both can be merged. I agree that it seems weird to have 2 different rules.

=== on 29 Apr 2015, 12:54:48 Ann Campbell wrote:
\[~linda.martin], I've updated RSPEC-2873, and am closing this as a duplicate.

endif::env-github,rspecator-view[]
