-
Notifications
You must be signed in to change notification settings - Fork 1.1k
move 'extend final class' to error class #3283
New issue
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, and thank you for opening this PR! 🎉
All contributors have signed the CLA, thank you! ❤️
Have an awesome day! ☀️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpicks. Otherwise LGTM
}.expect { (ictx, messages) => | ||
implicit val ctx: Context = ictx | ||
assertMessageCount(1, messages) | ||
val ExtendFinalClass(extendee, parent) :: Nil = messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be extender
and not extendee
val kind = "Syntax" | ||
val msg = hl"$clazz cannot extend ${"final"} $finalClazz" | ||
val explanation = | ||
hl"""A class marked with the ${"final"} keyword cannot be extended by an object or a class""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would simply say "... cannot be extended". For instance, a trait
cannot extends a final class
either.
Thanks for the review, I've addressed your points. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you for your contribution ! 🎉
No description provided.