We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 359dea2 commit d0d7ed6Copy full SHA for d0d7ed6
csharp/ql/test/library-tests/csharp8/NullableRefTypes.cs
@@ -208,14 +208,14 @@ void ExceptionFlow()
208
209
string InvocationTest(object? o)
210
{
211
- var t = o?.GetType(); // Not null (incorrect - should be null maybe)
+ var t = o?.GetType(); // Maybe null
212
return t.ToString(); // Not null
213
}
214
215
void ElementTest(List<string>? list)
216
217
- string? a = GetSelf()?.Field; // Not null (incorrect - should be null maybe)
218
- string? b = list?[0]; // Not null (incorrect - should be null maybe)
+ string? a = GetSelf()?.Field; // Maybe null
+ string? b = list?[0]; // Maybe null
219
string c = list[0]; // Not null
220
string d = GetSelf().Field; // Not null
221
0 commit comments