Explanation
¥
The
variable d has type Cons which supports the method getRest. What is
the type of d.getRest()? The return type of the
method getRest, which is DeptDirectory. Does DeptDirectory support the method getRest? No. Hence, the method call
(d.getRest()).getRest()
is not well-typed.
¥