41 references to ERR_StackAllocConversionNotPossible
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Expressions.cs (1)
2600
Error(diagnostics, ErrorCode.
ERR_StackAllocConversionNotPossible
, syntax, stackAllocExpression.ElementType, targetType);
Binder\Binder_Statements.cs (1)
2349
Error(diagnostics, ErrorCode.
ERR_StackAllocConversionNotPossible
, syntax, stackAllocExpression.ElementType, targetType);
Errors\ErrorFacts.cs (1)
1802
case ErrorCode.
ERR_StackAllocConversionNotPossible
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (37)
Semantics\NullableReferenceTypesTests.cs (1)
1375
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc[] { 1 }").WithArguments("int", "int*").WithLocation(8, 20),
Semantics\SpanStackSafetyTests.cs (2)
1538
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int [10]").WithArguments("int", "System.Span<int>").WithLocation(7, 23));
1579
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int [10]").WithArguments("int", "System.Span<int>").WithLocation(7, 23));
Semantics\StackAllocInitializerTests.cs (18)
1017
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[3] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(11, 24),
1020
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(20, 24),
1023
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc[] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(29, 24)
1119
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[3] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(11, 24),
1122
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(20, 24),
1125
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc[] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(29, 24)
1206
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[3] { 1, 2, 3 }").WithArguments("int", "double").WithLocation(6, 20),
1209
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(short)stackalloc int[3] { 1, 2, 3 }").WithArguments("int", "short").WithLocation(7, 19),
1212
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[] { 1, 2, 3 }").WithArguments("int", "double").WithLocation(12, 20),
1215
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(short)stackalloc int[] { 1, 2, 3 }").WithArguments("int", "short").WithLocation(13, 19),
1218
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc[] { 1, 2, 3 }").WithArguments("int", "double").WithLocation(18, 20),
1221
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(short)stackalloc[] { 1, 2, 3 }").WithArguments("int", "short").WithLocation(19, 19)
1337
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(Span<int>)stackalloc short [3] { (short)1, (short)2, (short)3 }").WithArguments("short", "System.Span<int>").WithLocation(7, 59),
1340
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(Span<int>)stackalloc short [ ] { (short)1, (short)2, (short)3 }").WithArguments("short", "System.Span<int>").WithLocation(8, 59),
1343
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(Span<int>)stackalloc [ ] { (short)1, (short)2, (short)3 }").WithArguments("short", "System.Span<int>").WithLocation(9, 59)
1551
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int [3] { 1, 2, 3 }").WithArguments("int", "System.IDisposable").WithLocation(6, 40),
1554
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int [ ] { 1, 2, 3 }").WithArguments("int", "System.IDisposable").WithLocation(7, 40),
1557
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc [ ] { 1, 2, 3 }").WithArguments("int", "System.IDisposable").WithLocation(8, 40)
Semantics\StackAllocSpanExpressionsTests.cs (8)
48
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[10]").WithArguments("int", "double*").WithLocation(11, 24));
122
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[10]").WithArguments("int", "double*").WithLocation(11, 24));
186
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[10]").WithArguments("int", "double").WithLocation(6, 20),
189
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(short)stackalloc int[10]").WithArguments("int", "short").WithLocation(7, 19));
274
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(Span<int>)stackalloc short [5]").WithArguments("short", "System.Span<int>").WithLocation(7, 46));
456
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[1]").WithArguments("int", "System.IDisposable").WithLocation(6, 39));
816
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[2]").WithArguments("int", "Test").WithLocation(9, 15));
842
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[2]").WithArguments("int", "Test").WithLocation(9, 15));
Semantics\UnsafeTests.cs (8)
8317
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(int*)stackalloc int[1]").WithArguments("int", "int*").WithLocation(6, 19),
8320
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(void*)stackalloc int[1]").WithArguments("int", "void*").WithLocation(7, 19),
8323
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(C)stackalloc int[1]").WithArguments("int", "C").WithLocation(8, 19));
8327
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(int*)stackalloc int[1]").WithArguments("int", "int*").WithLocation(6, 19),
8330
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(void*)stackalloc int[1]").WithArguments("int", "void*").WithLocation(7, 19),
8333
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(C)stackalloc int[1]").WithArguments("int", "C").WithLocation(8, 19));
8353
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[1]").WithArguments("int", "int*").WithLocation(4, 14)
8401
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[1]").WithArguments("int", "int*").WithLocation(2, 17)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\PropertyTests.cs (1)
2899
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[256]").WithArguments("int", "int*").WithLocation(4, 30)