15 references to ERR_CannotUseManagedTypeInUnmanagedCallersOnly
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
2149
or ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1421
diagnostics.Add(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, syntax.Location, type, (isParam ? MessageID.IDS_Parameter : MessageID.IDS_Return).Localize());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (12)
CodeGen\CodeGenFunctionPointersTests.cs (12)
8127
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "string").WithArguments("string", "return").WithLocation(6, 12),
8130
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "object o").WithArguments("object", "parameter").WithLocation(9, 20),
8136
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "T").WithArguments("T", "return").WithLocation(12, 12),
8142
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "T t").WithArguments("T", "parameter").WithLocation(15, 23),
8148
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "T").WithArguments("T", "return").WithLocation(18, 12),
8154
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "T t").WithArguments("T", "parameter").WithLocation(21, 23),
8546
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "S<object>").WithArguments("S<object>", "return").WithLocation(10, 12),
8549
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "S<object> o").WithArguments("S<object>", "parameter").WithLocation(13, 20),
8552
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "S<S<object>>").WithArguments("S<S<object>>", "return").WithLocation(16, 12),
8555
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "S<S<object>> o").WithArguments("S<S<object>>", "parameter").WithLocation(19, 20)
9807
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "Task").WithArguments("System.Threading.Tasks.Task", "return").WithLocation(11, 25),
9837
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "Task").WithArguments("System.Threading.Tasks.Task", "return").WithLocation(11, 25),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\CollectionExpressionTests.cs (1)
19069
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "ReadOnlySpan<T> items").WithArguments("System.ReadOnlySpan<T>", "parameter").WithLocation(15, 45));