172 references to MaybeNullAttributeDefinition
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (15)
FieldKeywordTests.cs (14)
6062
var comp = CreateCompilation([source,
MaybeNullAttributeDefinition
]);
6091
var comp = CreateCompilation([source,
MaybeNullAttributeDefinition
]);
6123
var comp = CreateCompilation([source,
MaybeNullAttributeDefinition
]);
6149
var comp = CreateCompilation([source,
MaybeNullAttributeDefinition
, AllowNullAttributeDefinition]);
6178
var comp = CreateCompilation([source,
MaybeNullAttributeDefinition
, AllowNullAttributeDefinition]);
6207
var comp = CreateCompilation([source,
MaybeNullAttributeDefinition
, AllowNullAttributeDefinition]);
6458
var comp = CreateCompilation([source,
MaybeNullAttributeDefinition
, AllowNullAttributeDefinition]);
6519
var comp = CreateCompilation([source,
MaybeNullAttributeDefinition
, AllowNullAttributeDefinition]);
6990
var comp = CreateCompilation([source, RequiredMemberAttribute, CompilerFeatureRequiredAttribute, SetsRequiredMembersAttribute,
MaybeNullAttributeDefinition
, AllowNullAttributeDefinition]);
7020
var comp = CreateCompilation([source, RequiredMemberAttribute, CompilerFeatureRequiredAttribute, SetsRequiredMembersAttribute,
MaybeNullAttributeDefinition
, AllowNullAttributeDefinition]);
7052
var comp = CreateCompilation([source, RequiredMemberAttribute, CompilerFeatureRequiredAttribute, SetsRequiredMembersAttribute,
MaybeNullAttributeDefinition
, AllowNullAttributeDefinition]);
7196
var comp = CreateCompilation([source,
MaybeNullAttributeDefinition
, AllowNullAttributeDefinition]);
7269
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
7395
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
Semantics\RecordTests.cs (1)
9410
var comp = CreateCompilation(new[] { src,
MaybeNullAttributeDefinition
});
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (157)
Semantics\LambdaTests.cs (6)
4206
new[] { source,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, NotNullIfNotNullAttributeDefinition, MemberNotNullAttributeDefinition, MemberNotNullWhenAttributeDefinition },
4238
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition }, parseOptions: TestOptions.RegularPreview);
4285
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
4359
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
4406
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
4582
var comp = CreateCompilation(new[] { source, MaybeNullWhenAttributeDefinition, NotNullWhenAttributeDefinition,
MaybeNullAttributeDefinition
});
Semantics\LocalFunctionTests.cs (1)
6222
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, parseOptions: TestOptions.Regular9);
Semantics\NullableReferenceTypesTests.cs (143)
28989
",
MaybeNullAttributeDefinition
});
29016
",
MaybeNullAttributeDefinition
});
29064
",
MaybeNullAttributeDefinition
});
29208
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
, NotNullWhenAttributeDefinition });
29759
",
MaybeNullAttributeDefinition
}, parseOptions: TestOptions.Regular8);
29790
",
MaybeNullAttributeDefinition
});
29811
",
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
29906
",
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
30064
",
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
30100
var lib = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, lib_cs });
30163
var comp2 = CreateNullableCompilation(new[] { source, lib_cs,
MaybeNullAttributeDefinition
});
30248
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30266
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, source });
30342
var lib = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, lib_cs });
30391
var comp2 = CreateNullableCompilation(new[] { source, lib_cs,
MaybeNullAttributeDefinition
});
30419
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30457
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30492
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30525
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30562
var lib = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, lib_cs });
30610
var comp2 = CreateNullableCompilation(new[] { source, lib_cs,
MaybeNullAttributeDefinition
});
30638
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30673
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30696
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
30722
var lib = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, lib_cs });
30788
var comp2 = CreateNullableCompilation(new[] { source, lib_cs,
MaybeNullAttributeDefinition
});
30827
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30851
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30877
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30903
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30925
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
31413
", MaybeNullWhenAttributeDefinition,
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
33111
var comp = CreateNullableCompilation(new[] { source, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
33998
var lib = CreateNullableCompilation(new[] { NotNullIfNotNullAttributeDefinition,
MaybeNullAttributeDefinition
, lib_cs });
34002
var comp2 = CreateNullableCompilation(new[] { source, lib_cs, NotNullIfNotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
34703
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, DisallowNullAttributeDefinition, source });
39585
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39656
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39714
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39780
var comp = CreateCompilation(new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
39858
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39896
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39942
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39994
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
40116
var comp = CreateNullableCompilation(new[] { AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, source });
40476
var comp = CreateNullableCompilation(new[] { source, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
40497
var comp = CreateNullableCompilation(new[] { source, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
40772
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
}, references: new[] { lib.EmitToImageReference() });
40775
var comp2 = CreateNullableCompilation(new[] { source, lib_cs, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
41535
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
42143
",
MaybeNullAttributeDefinition
});
42305
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition, source });
42405
var comp = CreateNullableCompilation(new[] { AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition, source.Replace("TYPE", type) });
42448
var comp = CreateNullableCompilation(new[] { AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition, source.Replace("TYPE", type) });
42902
var comp = CreateNullableCompilation(new[] { AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition, source });
43290
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullWhenAttributeDefinition, source });
43316
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullWhenAttributeDefinition, source });
43371
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
43514
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
43667
var comp = CreateNullableCompilation(new[] { MaybeNullWhenAttributeDefinition,
MaybeNullAttributeDefinition
, source });
43714
var comp = CreateNullableCompilation(new[] { MaybeNullWhenAttributeDefinition,
MaybeNullAttributeDefinition
, source });
44875
var comp = CreateNullableCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition },
44879
var comp2 = CreateNullableCompilation(new[] { source, lib_cs, DisallowNullAttributeDefinition, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
44916
var lib = CreateNullableCompilation(new[] { DisallowNullAttributeDefinition, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, lib_cs });
44942
var comp2 = CreateNullableCompilation(new[] { source, lib_cs, DisallowNullAttributeDefinition, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
45734
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, source });
45762
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullWhenAttributeDefinition, source });
45787
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullWhenAttributeDefinition, source });
45847
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
45967
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
46093
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, source }, options: WithNullableEnable());
46191
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
46217
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
46235
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source0 }, options: WithNullableEnable());
46285
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source0 }, options: WithNullableEnable());
46345
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
46390
",
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
46493
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
46647
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
46743
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
46773
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
46792
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source0 });
46848
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source0 });
46924
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
47056
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source }, parseOptions: TestOptions.Regular8);
47175
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
47214
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source });
47243
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition, source });
47538
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, source0 });
47590
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, source });
48367
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, source });
48404
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, source });
48469
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, source });
48800
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, source }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8);
68266
", GetInterpolatedStringCustomHandlerType("CustomHandler<T>", "partial struct", useBoolReturns, includeTrailingOutConstructorParameter: validityParameter), InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
},
68626
var comp = CreateCompilation(new[] { code, handler, InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
});
68824
var comp = CreateCompilation(new[] { code, handler, InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
});
68976
var comp = CreateCompilation(new[] { code, handler, InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
});
69004
var comp = CreateCompilation(new[] { code, handler, InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
});
69032
var comp = CreateCompilation(new[] { code, handler, InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
});
70028
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
, DisallowNullAttributeDefinition });
70075
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition });
70183
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
, DisallowNullAttributeDefinition });
70223
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
, DisallowNullAttributeDefinition });
70254
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
72266
",
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
91140
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
91199
var comp = CreateCompilationWithTasksExtensions(new[] { source,
MaybeNullAttributeDefinition
});
91644
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
91908
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable(), parseOptions: TestOptions.Regular9);
92088
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable(), parseOptions: TestOptions.Regular9);
92412
var comp = CreateCompilationWithTasksExtensions(new[] { source, s_IAsyncEnumerable,
MaybeNullAttributeDefinition
}, options: WithNullableEnable(), parseOptions: TestOptions.Regular9);
92595
var comp = CreateCompilationWithTasksExtensions(new[] { source, s_IAsyncEnumerable,
MaybeNullAttributeDefinition
}, options: WithNullableEnable(), parseOptions: TestOptions.Regular9);
148013
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, parseOptions: TestOptions.Regular8);
148028
comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148356
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, parseOptions: TestOptions.Regular8);
148368
comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148440
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
}, parseOptions: TestOptions.Regular8);
148455
comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
148608
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, parseOptions: TestOptions.Regular8);
148614
comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148726
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
148808
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148912
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148959
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148999
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149043
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149067
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149126
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
149158
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
149336
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149359
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149612
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
149717
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition, DisallowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
149765
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition, DisallowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
149802
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition, DisallowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
149847
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition, DisallowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
152674
var comp = CreateCompilation(new[] { sourceA, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
153216
var comp = CreateCompilation(new[] { sourceA, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
153489
comp = CreateCompilation(new[] { sourceB2, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
}, references: new[] { refA });
155898
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
158932
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, DoesNotReturnAttributeDefinition, DoesNotReturnIfAttributeDefinition });
160606
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
Semantics\UninitializedNonNullableFieldTests.cs (7)
666
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
1350
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8);
2662
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
2677
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
2692
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
2707
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
2722
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable());