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

MsgPack003 flags reference to class with ? nullable annotation, despite appearing in MessagePackAnalyzer.json #1706

Open
AArnott opened this issue Nov 15, 2023 · 0 comments
Labels

Comments

@AArnott
Copy link
Collaborator

AArnott commented Nov 15, 2023

Bug description

The MsgPack003 analyzers should ignore the ? annotation from nullable reference types before looking for a matching type name in MessagePackAnalyzer.json.

Repro steps

	[Key(9)]
	public ZcashAddress? OtherPartyAddress { get; init; }

And a MessagePackAnalyzer.json file with this content:

[
	"Nerdbank.Zcash.ZcashAddress"
]

Expected behavior

No error

Actual behavior

Error MsgPack003 Type must be marked with MessagePackObjectAttribute. ZcashTransaction.OtherPartyAddress.

What happened instead of what you expected.

  • Version used: 2.5.129

Workaround

Remove the ? annotation, and attribute the member with [MaybeNull] instead.

@AArnott AArnott added the bug label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant