Skip to content
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

XmlDoc is allowed before and in type definitions #11489

Closed
auduchinok opened this issue Apr 27, 2021 · 7 comments
Closed

XmlDoc is allowed before and in type definitions #11489

auduchinok opened this issue Apr 27, 2021 · 7 comments

Comments

@auduchinok
Copy link
Member

type A = class end

/// Bbb
and
    B = class end

Screenshot 2021-04-27 at 17 21 18

@auduchinok auduchinok changed the title XmlDoc is allowed before and type definitions XmlDoc is allowed before and in type definitions Apr 27, 2021
@auduchinok
Copy link
Member Author

auduchinok commented Apr 27, 2021

Another case with wrong reported xml doc range would be:

type A = class end

/// Bbb
and
/// 123
    B = class end

@cartermp
Copy link
Contributor

What would you expect the result to be? I don't personally think it's an issue that you see Bbb when hovering over B

@auduchinok
Copy link
Member Author

I'd not expect anything before and to belong to the declaration.
Maybe it's due to I'm used to quite strict C# rules for these comments.

@cartermp
Copy link
Contributor

I guess it's a little hard to make a call when you write it like this:

image

I often do that, and so it feels consistent to me. But I can understand why it's weird that you can write XML docs in both places such as your sample.

@auduchinok
Copy link
Member Author

auduchinok commented Apr 27, 2021

OK, how about having more preceding things? 🙂

Screenshot 2021-04-28 at 00 06 27

C# rules would only use the last doc comment block, i.e. /// world here.

@cartermp
Copy link
Contributor

Yeah, in that case it's a quirk to be sure. But I wouldn't agree with eliminating the one with the union case either. I'll label this an improvement.

@dsyme
Copy link
Contributor

dsyme commented Nov 5, 2021

This was fixed by #11973

@dsyme dsyme closed this as completed Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants