scala3
scala3 copied to clipboard
fix(#16610): warn ignored Scaladoc on multiple enum cases
close #16610
Before this commit, the compiler ignored Scaladoc comment on multiple enum cases without warning.
This is partly expected because the case to which the doc is attached is ambiguous, but we should at least warn users that the comment is ignored by compiler due to ambiguity and they should take an action if they want the doc to be displayed.
@Florian3k would you be kind enough to review the changes?
Hi, sorry for the delay, I've somehow missed the notification. I'll get to this ASAP.
This looks good, but to add new warning without flag we need to wait for 3.5.0.
For now, we can hide this behind a flag, eg. -Wcheck-comments.
Would you be able to do that? If no, let me know and we will take care of it.
Would you be able to do that?
I haven't tried yet, so I'm not sure, but may I try it?
https://github.com/scala/scala3/blob/a9bb881f13d032219f695d9b7c3fd5ed5c30f059/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala#L162