linkedin-skill-assessments-quizzes icon indicating copy to clipboard operation
linkedin-skill-assessments-quizzes copied to clipboard

Kotlin - question 45

Open roozbehzarei opened this issue 2 years ago • 2 comments

The real reason behind the code snippet not compiling is that name parameter for class Cat should be defined as a property (contain val/var keyword) otherwise fun greet() won't have access to it, thus giving unresolved reference error for this.name.

None of the provided answers are correct for this question.

roozbehzarei avatar Jun 12 '22 07:06 roozbehzarei

Hello @roozbehzarei , thank you for submitting an issue! 👍 We highly appreciate it if you work on it as well.

github-actions[bot] avatar Jun 12 '22 07:06 github-actions[bot]

@roozbehzarei thanks for your comment and sorry for being later, I think we can add it as a comment directly under the question. Because I think it is better to keep original code snippet to make it searchable. But I got your point which is very valuable to keep under this question. Feel free create PR or let me know I can do it. Thanks

Ebazhanov avatar Jul 30 '22 18:07 Ebazhanov

Created PR #4177 to add the necessary details.

roozbehzarei avatar Aug 07 '22 16:08 roozbehzarei