We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I use the solution for task 7:
val Event.durationOfEvent: String get() = if (this.durationInMinutes < 60) {"short"} else {"long"}
I get: Unresolved reference 'durationOfEvent'. when calling to println("Duration of first event of the day: ${events[0].durationOfEvent}").
Unresolved reference 'durationOfEvent'.
println("Duration of first event of the day: ${events[0].durationOfEvent}")
However, if I remove the Event. part in the extension property (so it's an extension of the objects and not of a class property),
val durationOfEvent: String get() = if (this.durationInMinutes < 60) {"short"} else {"long"}
now it works correctly: Duration of first event of the day: short
Duration of first event of the day: short
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If I use the solution for task 7:
I get:
Unresolved reference 'durationOfEvent'.
when calling to
println("Duration of first event of the day: ${events[0].durationOfEvent}")
.However, if I remove the Event. part in the extension property (so it's an extension of the objects and not of a class property),
now it works correctly:
Duration of first event of the day: short
The text was updated successfully, but these errors were encountered: