google-developer-training / kotlin-bootcamp

Report issues with the Kotlin Bootcamp for Programmers codelab
7 stars 2 forks source link

Kotlin Bootcamp issue: #189

Open prasannaba opened 1 year ago

prasannaba commented 1 year ago

Describe the problem A clear and concise description of what the problem is. var fishFoodTreats = 6 fishFoodTreats = fishFoodTreats?.dec()

The statement gives error, such statements need to be avoided in tutorials. Even though output is not mentioned, but the declaration itself is not correct.

In which step of the codelab can this issue be found? Step number. 2

Steps to reproduce? What are the steps to reproduce the problem? var fishFoodTreats = 6 fishFoodTreats = fishFoodTreats?.dec()

This statement gives error: type mismatch: inferred type is Int? but Int was expected

Versions What version of IntelliJ IDEA are you using? 2023.2 Additional information Add any other context about the problem here.

codelab: kotlin-bootcamp