Replies: 5 comments
-
Regarding
I disagree that these constraints are contradictory. These constraints are compatible because there exist type arguments that satisfy both constraints (e.g. |
Beta Was this translation helpful? Give feedback.
-
Edited in light of @orthoxerox's comments below I think the Firstly, some means of applying this attribute to the whole project is needed. I'm unclear whether that's currently possible. If it is, great. If not, a means of applying it is really needed as it'll be a nuisance to have to add it everywhere. Secondly, I want to be able to treat enum UnannotatedTypesBehaviour
{
Oblivious,
NonNullable,
Nullable
} With the resultant table being:
|
Beta Was this translation helpful? Give feedback.
-
How will treating parameters as non nullable help you? First of all, this is not 100% true, and second, it will only trigger the warning if you explicitly use nullable variables in your own code (and I expect your code to contain very few nullable variables 😁). It will also trigger if you use code like |
Beta Was this translation helpful? Give feedback.
-
That was my thoughts too. But I assume we are being offered two options (oblivious and treat as non-nullable) for a reason. I want to be able to treat returns as nullable. Parameters aren't so important. So I tried to make as small a change from what was proposed as possible. Treating everything as nullable would work too. Having said that, treating parameters as non-nullable has the advantage that I must explicitly mark parameters with a |
Beta Was this translation helpful? Give feedback.
-
Your |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
See https://github.com/dotnet/csharplang/blob/master/meetings/2018/LDM-2018-07-11.md
Agenda
Beta Was this translation helpful? Give feedback.
All reactions