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)
28995
",
MaybeNullAttributeDefinition
});
29022
",
MaybeNullAttributeDefinition
});
29070
",
MaybeNullAttributeDefinition
});
29214
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
, NotNullWhenAttributeDefinition });
29765
",
MaybeNullAttributeDefinition
}, parseOptions: TestOptions.Regular8);
29796
",
MaybeNullAttributeDefinition
});
29817
",
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
29912
",
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
30070
",
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
30106
var lib = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, lib_cs });
30169
var comp2 = CreateNullableCompilation(new[] { source, lib_cs,
MaybeNullAttributeDefinition
});
30254
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30272
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, source });
30348
var lib = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, lib_cs });
30397
var comp2 = CreateNullableCompilation(new[] { source, lib_cs,
MaybeNullAttributeDefinition
});
30425
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30463
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30498
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30531
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30568
var lib = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, lib_cs });
30616
var comp2 = CreateNullableCompilation(new[] { source, lib_cs,
MaybeNullAttributeDefinition
});
30644
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30679
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30702
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
30728
var lib = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, lib_cs });
30794
var comp2 = CreateNullableCompilation(new[] { source, lib_cs,
MaybeNullAttributeDefinition
});
30833
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30857
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30883
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30909
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
30931
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
31419
", MaybeNullWhenAttributeDefinition,
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
33117
var comp = CreateNullableCompilation(new[] { source, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
34004
var lib = CreateNullableCompilation(new[] { NotNullIfNotNullAttributeDefinition,
MaybeNullAttributeDefinition
, lib_cs });
34008
var comp2 = CreateNullableCompilation(new[] { source, lib_cs, NotNullIfNotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
34709
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, DisallowNullAttributeDefinition, source });
39591
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39662
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39720
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39786
var comp = CreateCompilation(new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
39864
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39902
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
39948
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
40000
new[] { source, DisallowNullAttributeDefinition, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
},
40122
var comp = CreateNullableCompilation(new[] { AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, source });
40482
var comp = CreateNullableCompilation(new[] { source, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
40503
var comp = CreateNullableCompilation(new[] { source, AllowNullAttributeDefinition, NotNullAttributeDefinition,
MaybeNullAttributeDefinition
});
40778
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
}, references: new[] { lib.EmitToImageReference() });
40781
var comp2 = CreateNullableCompilation(new[] { source, lib_cs, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
41541
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
42149
",
MaybeNullAttributeDefinition
});
42311
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition, source });
42411
var comp = CreateNullableCompilation(new[] { AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition, source.Replace("TYPE", type) });
42454
var comp = CreateNullableCompilation(new[] { AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition, source.Replace("TYPE", type) });
42908
var comp = CreateNullableCompilation(new[] { AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition, source });
43296
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullWhenAttributeDefinition, source });
43322
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullWhenAttributeDefinition, source });
43377
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
43520
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
43673
var comp = CreateNullableCompilation(new[] { MaybeNullWhenAttributeDefinition,
MaybeNullAttributeDefinition
, source });
43720
var comp = CreateNullableCompilation(new[] { MaybeNullWhenAttributeDefinition,
MaybeNullAttributeDefinition
, source });
44881
var comp = CreateNullableCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition },
44885
var comp2 = CreateNullableCompilation(new[] { source, lib_cs, DisallowNullAttributeDefinition, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
44922
var lib = CreateNullableCompilation(new[] { DisallowNullAttributeDefinition, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, lib_cs });
44948
var comp2 = CreateNullableCompilation(new[] { source, lib_cs, DisallowNullAttributeDefinition, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
45740
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, source });
45768
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullWhenAttributeDefinition, source });
45793
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullWhenAttributeDefinition, source });
45853
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
45973
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
46099
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, source }, options: WithNullableEnable());
46197
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
46223
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
46241
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source0 }, options: WithNullableEnable());
46291
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source0 }, options: WithNullableEnable());
46351
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source }, options: WithNullableEnable());
46396
",
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
46499
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
46653
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
46749
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
46779
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
46798
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source0 });
46854
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source0 });
46930
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
47062
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source }, parseOptions: TestOptions.Regular8);
47181
var comp = CreateNullableCompilation(new[] {
MaybeNullAttributeDefinition
, source });
47220
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, source });
47249
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition, source });
47544
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, source0 });
47596
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, source });
48373
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, source });
48410
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, source });
48475
var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition,
MaybeNullAttributeDefinition
, source });
48806
var comp = CreateCompilation(new[] {
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, source }, options: WithNullableEnable(), parseOptions: TestOptions.Regular8);
68272
", GetInterpolatedStringCustomHandlerType("CustomHandler<T>", "partial struct", useBoolReturns, includeTrailingOutConstructorParameter: validityParameter), InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
},
68632
var comp = CreateCompilation(new[] { code, handler, InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
});
68830
var comp = CreateCompilation(new[] { code, handler, InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
});
68982
var comp = CreateCompilation(new[] { code, handler, InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
});
69010
var comp = CreateCompilation(new[] { code, handler, InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
});
69038
var comp = CreateCompilation(new[] { code, handler, InterpolatedStringHandlerArgumentAttribute,
MaybeNullAttributeDefinition
});
70034
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
, DisallowNullAttributeDefinition });
70081
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
, MaybeNullWhenAttributeDefinition });
70189
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
, DisallowNullAttributeDefinition });
70229
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
, DisallowNullAttributeDefinition });
70260
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
72272
",
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
91146
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
91205
var comp = CreateCompilationWithTasksExtensions(new[] { source,
MaybeNullAttributeDefinition
});
91650
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable());
91914
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable(), parseOptions: TestOptions.Regular9);
92094
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, options: WithNullableEnable(), parseOptions: TestOptions.Regular9);
92418
var comp = CreateCompilationWithTasksExtensions(new[] { source, s_IAsyncEnumerable,
MaybeNullAttributeDefinition
}, options: WithNullableEnable(), parseOptions: TestOptions.Regular9);
92601
var comp = CreateCompilationWithTasksExtensions(new[] { source, s_IAsyncEnumerable,
MaybeNullAttributeDefinition
}, options: WithNullableEnable(), parseOptions: TestOptions.Regular9);
148019
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, parseOptions: TestOptions.Regular8);
148034
comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148362
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, parseOptions: TestOptions.Regular8);
148374
comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148446
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
}, parseOptions: TestOptions.Regular8);
148461
comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
148614
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
}, parseOptions: TestOptions.Regular8);
148620
comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148732
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
148814
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148918
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
148965
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149005
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149049
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149073
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149132
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
149164
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
149342
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149365
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
});
149618
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
149723
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition, DisallowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
149771
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition, DisallowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
149808
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition, DisallowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
149853
var comp = CreateCompilation(new[] { source, AllowNullAttributeDefinition, DisallowNullAttributeDefinition,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition });
152680
var comp = CreateCompilation(new[] { sourceA, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
153222
var comp = CreateCompilation(new[] { sourceA, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
});
153495
comp = CreateCompilation(new[] { sourceB2, AllowNullAttributeDefinition,
MaybeNullAttributeDefinition
}, references: new[] { refA });
155904
var comp = CreateNullableCompilation(new[] { source,
MaybeNullAttributeDefinition
});
158938
var comp = CreateCompilation(new[] { source,
MaybeNullAttributeDefinition
, NotNullAttributeDefinition, DoesNotReturnAttributeDefinition, DoesNotReturnIfAttributeDefinition });
160612
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());