JB Nizet (2) [Avatar] Offline

I found three more errors in the book:

Section 4.4.2: the example about JSONFactory should use override, and should implement JSONFactory<Person>, not JSONFactory<T>:

interface JSONFactory<T> {
fun fromJSON(jsonText: String): T

class Person(val name: String) {
companion object : JSONFactory<Person> {
override fun fromJSON(jsonText: String): Person = ...

Section 9.2.2: « As we discussed in section Inline functions and noinline parameters, »: this note actually comes before the section about inline functions and noinline parameters, so we haven't discussed it yet.

Section 9.2.2: « Here’s a simplified version of the declaration of filterIsInstance from the Kotlin standard library: » the example that follows is wrong: it doesn't loop, and uses an undeclared variable element.

Dmitry Jemerov (40) [Avatar] Offline
Hi JB,

Thanks for your feedback!

1) This has been corrected some time ago; the fix will be included in the next MEAP update.
2) This in fact refers to section "Inline functions" in chapter 8. I've fixed the markup so that the hyperlink is rendered correctly.
3) Fixed, thanks!