15 references to ERR_CannotUseManagedTypeInUnmanagedCallersOnly
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
2147
or ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1433
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)
8125
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "string").WithArguments("string", "return").WithLocation(6, 12),
8128
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "object o").WithArguments("object", "parameter").WithLocation(9, 20),
8134
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "T").WithArguments("T", "return").WithLocation(12, 12),
8140
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "T t").WithArguments("T", "parameter").WithLocation(15, 23),
8146
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "T").WithArguments("T", "return").WithLocation(18, 12),
8152
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "T t").WithArguments("T", "parameter").WithLocation(21, 23),
8544
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "S<object>").WithArguments("S<object>", "return").WithLocation(10, 12),
8547
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "S<object> o").WithArguments("S<object>", "parameter").WithLocation(13, 20),
8550
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "S<S<object>>").WithArguments("S<S<object>>", "return").WithLocation(16, 12),
8553
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "S<S<object>> o").WithArguments("S<S<object>>", "parameter").WithLocation(19, 20)
9802
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "Task").WithArguments("System.Threading.Tasks.Task", "return").WithLocation(11, 25),
9829
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "Task").WithArguments("System.Threading.Tasks.Task", "return").WithLocation(11, 25),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\CollectionExpressionTests.cs (1)
19072
Diagnostic(ErrorCode.
ERR_CannotUseManagedTypeInUnmanagedCallersOnly
, "ReadOnlySpan<T> items").WithArguments("System.ReadOnlySpan<T>", "parameter").WithLocation(15, 45));