Open Paredes opened 1 year ago
Hi, I found a error in: 4. Learn about nullability Specifically in Step 2 point 2, in the example code where show the use of ? operator
?
var fishFoodTreats = 6 fishFoodTreats = fishFoodTreats?.dec()
Generates the following:
error: type mismatch: inferred type is Int? but Int was expected fishFoodTreats = fishFoodTreats?.dec()
I believe that need to be:
var fishFoodTreats: Int? = 6 fishFoodTreats = fishFoodTreats?.dec()
Versions IntelliJ IDEA 2023.1.2 CE built on August 23, 2023 Windows 10
codelab: kotlin-bootcamp
I was about to report it. The same course is also available at the Kotlin Bootcamp for Programmers 2: Kotlin basics where I bumped into this mistake.
Hi, I found a error in: 4. Learn about nullability Specifically in Step 2 point 2, in the example code where show the use of
?
operatorGenerates the following:
I believe that need to be:
Versions IntelliJ IDEA 2023.1.2 CE built on August 23, 2023 Windows 10
codelab: kotlin-bootcamp