Skip to content
Discussion options

You must be logged in to vote

I think in this case it's probably safe, but I would still suggest considering annotating the generic arguments of your methods to avoid the suppression. Suppressions are very tricky to get right and even if they are right at the time you add them, they may not be forever. If somebody changes the code to actually do call the public parameterless .ctor there will still be no warning (because of the suppression) and suddenly things will break.

I vaguely remember us discussing that some .ctors of Lazy don't need the annotation (as you mention), but currently there's no good way to express this fact in the language/attributes.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bash
Comment options

Answer selected by bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants