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

Generated XML comments are malformed when using ValueObject<int?> #568

Closed
elianora opened this issue Apr 9, 2024 · 2 comments
Closed

Generated XML comments are malformed when using ValueObject<int?> #568

elianora opened this issue Apr 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@elianora
Copy link

elianora commented Apr 9, 2024

Describe the bug

Using the following:

  • Visual Studio 2022 Community 17.9.5
  • dotnet 8.0.202

When attempting to use ValueObject<int?>, build a project. You will notice that CS1570 is triggered for malformed XML comments in the generated file.

Steps to reproduce

  1. Add the following to a new file in a project:
[ValueObject<int?>]
public readonly partial struct MyType { }
  1. Attempt to build the project
  2. Notice that CS1570 is triggered in the generated file

Expected behaviour

CS1570 is not triggered in the generated file and the XML comments are well-formed

@elianora elianora added the bug Something isn't working label Apr 9, 2024
@SteveDunn
Copy link
Owner

Hi @elianora - thanks for the bug report. I can't seem to reproduce this issue. Have you got a solution that you can share?

@SteveDunn
Copy link
Owner

I'm closing this one for now, but if it's still an issue, please let me know.
Also, with regards to the nullable primitive: that (to my mind at least), it doesn't make sense to wrap a nullable primitive. Value objects represent values. In a way, it help to stop the use of null (alongside types such as Option, Maybe, OneOf etc.
What scenario do you find this useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants