18 references to IsUnsafe
Microsoft.CodeAnalysis.CSharp (10)
Binder\Binder_AnonymousTypes.cs (1)
226
else if (expressionType.
IsUnsafe
())
Binder\Binder_Conversions.cs (1)
1472
if ((selectedMethod.HasUnsafeParameter() || selectedMethod.ReturnType.
IsUnsafe
()) && ReportUnsafeIfNotAllowed(syntax, diagnostics))
Binder\Binder_Expressions.cs (2)
545
if ((object)exprType != null && exprType.
IsUnsafe
())
3223
if (!methodResult.Member.IsIndexer() && !argument.HasAnyErrors && parameterTypeWithAnnotations.Type.
IsUnsafe
())
Binder\Binder_Symbols.cs (1)
916
if (Compilation.IsFeatureEnabled(MessageID.IDS_FeatureUsingTypeAlias) ? type.ContainsPointer() : type.
IsUnsafe
())
Binder\ExecutableCodeBinder.cs (1)
116
else if (parameter.Type.
IsUnsafe
())
BoundTree\UnboundLambda.cs (1)
882
if (targetParameterTypes[i].Type.
IsUnsafe
())
Symbols\MemberSymbolExtensions.cs (1)
118
if (parameterType.Type.
IsUnsafe
())
Symbols\Source\SourceMethodSymbol.cs (1)
69
else if (parameter.Type.
IsUnsafe
())
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
145
if (parameterType.
IsUnsafe
())
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Semantics\UnsafeTests.cs (8)
414
Assert.True(fieldTypes[0].Type.
IsUnsafe
());
415
Assert.True(fieldTypes[1].Type.
IsUnsafe
());
416
Assert.True(fieldTypes[2].Type.
IsUnsafe
());
417
Assert.True(fieldTypes[3].Type.
IsUnsafe
());
419
Assert.False(fieldTypes[4].Type.
IsUnsafe
());
420
Assert.False(fieldTypes[5].Type.
IsUnsafe
());
421
Assert.False(fieldTypes[6].Type.
IsUnsafe
());
422
Assert.False(fieldTypes[7].Type.
IsUnsafe
());