scala3 icon indicating copy to clipboard operation
scala3 copied to clipboard

fix(#16610): warn ignored Scaladoc on multiple enum cases

Open i10416 opened this issue 1 year ago • 3 comments

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.

i10416 avatar Jan 28 '24 13:01 i10416

@Florian3k would you be kind enough to review the changes?

i10416 avatar Feb 24 '24 07:02 i10416

Hi, sorry for the delay, I've somehow missed the notification. I'll get to this ASAP.

Florian3k avatar Feb 26 '24 09:02 Florian3k

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.

Florian3k avatar Feb 26 '24 11:02 Florian3k

Would you be able to do that?

I haven't tried yet, so I'm not sure, but may I try it?

i10416 avatar Feb 28 '24 10:02 i10416

https://github.com/scala/scala3/blob/a9bb881f13d032219f695d9b7c3fd5ed5c30f059/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala#L162

i10416 avatar Mar 09 '24 17:03 i10416