You can get this error if you specify a class::method but forget one of the colons.
For example:
WRONG
Foo:staticMethod(3); // need two colons!
RIGHT
Foo::staticMethod(3);