Unresolved reference. None of the following candidates is applicable because of receiver type mismatch

I read the book and do examples and I have an error in listing 10.3:

What could be the problem?