Protocol composition: CustomStringConvertible

As son as I move CustomStringConvertible from the protocol definition to the printTable function definition, I get a compiler error:

Playground execution failed: error: Prtcl.playground:92:12: error: argument type 'Department' does not conform to expected type 'CustomStringConvertible & TabularDataSource'
printTable(department)
           ^~~~~~~~~~
                      as! CustomStringConvertible & TabularDataSource

Why does this happen?

I get the same compiler error - did you ever figure out the cause?

What exactly are you trying to do? It would help if more information, including the code, were provided.

In Listing 19.15 the “_” before “dataSource:” in the func printTable() is missing. This cause an error.