There is a mistake in this chapter where the reader is asked to add a class to the same stack.kt file where the inference is… this is fine except the implementation code is wrong:
class Stack() {
private val storage = arrayListOf()
it should be:
class StackImpl : Stack {
private val storage = arrayListOf()