41 references to ERR_StackAllocConversionNotPossible
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Expressions.cs (1)
2860
Error(diagnostics, ErrorCode.
ERR_StackAllocConversionNotPossible
, syntax, stackAllocExpression.ElementType, targetType);
Binder\Binder_Statements.cs (1)
2401
Error(diagnostics, ErrorCode.
ERR_StackAllocConversionNotPossible
, syntax, stackAllocExpression.ElementType, targetType);
Errors\ErrorFacts.cs (1)
1861
or ErrorCode.
ERR_StackAllocConversionNotPossible
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (37)
Semantics\NullableReferenceTypesTests.cs (1)
1387
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc[] { 1 }").WithArguments("int", "int*").WithLocation(8, 20),
Semantics\SpanStackSafetyTests.cs (2)
2030
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int [10]").WithArguments("int", "System.Span<int>").WithLocation(7, 23));
2071
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int [10]").WithArguments("int", "System.Span<int>").WithLocation(7, 23));
Semantics\StackAllocInitializerTests.cs (18)
1033
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[3] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(11, 24),
1036
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(20, 24),
1039
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc[] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(29, 24)
1135
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[3] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(11, 24),
1138
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(20, 24),
1141
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc[] { 1, 2, 3 }").WithArguments("int", "double*").WithLocation(29, 24)
1222
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[3] { 1, 2, 3 }").WithArguments("int", "double").WithLocation(6, 20),
1225
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(short)stackalloc int[3] { 1, 2, 3 }").WithArguments("int", "short").WithLocation(7, 19),
1228
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[] { 1, 2, 3 }").WithArguments("int", "double").WithLocation(12, 20),
1231
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(short)stackalloc int[] { 1, 2, 3 }").WithArguments("int", "short").WithLocation(13, 19),
1234
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc[] { 1, 2, 3 }").WithArguments("int", "double").WithLocation(18, 20),
1237
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(short)stackalloc[] { 1, 2, 3 }").WithArguments("int", "short").WithLocation(19, 19)
1353
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(Span<int>)stackalloc short [3] { (short)1, (short)2, (short)3 }").WithArguments("short", "System.Span<int>").WithLocation(7, 59),
1356
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(Span<int>)stackalloc short [ ] { (short)1, (short)2, (short)3 }").WithArguments("short", "System.Span<int>").WithLocation(8, 59),
1359
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(Span<int>)stackalloc [ ] { (short)1, (short)2, (short)3 }").WithArguments("short", "System.Span<int>").WithLocation(9, 59)
1567
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int [3] { 1, 2, 3 }").WithArguments("int", "System.IDisposable").WithLocation(6, 40),
1570
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int [ ] { 1, 2, 3 }").WithArguments("int", "System.IDisposable").WithLocation(7, 40),
1573
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)
11169
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(int*)stackalloc int[1]").WithArguments("int", "int*").WithLocation(6, 19),
11172
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(void*)stackalloc int[1]").WithArguments("int", "void*").WithLocation(7, 19),
11175
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(C)stackalloc int[1]").WithArguments("int", "C").WithLocation(8, 19));
11179
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(int*)stackalloc int[1]").WithArguments("int", "int*").WithLocation(6, 19),
11182
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(void*)stackalloc int[1]").WithArguments("int", "void*").WithLocation(7, 19),
11185
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "(C)stackalloc int[1]").WithArguments("int", "C").WithLocation(8, 19));
11205
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[1]").WithArguments("int", "int*").WithLocation(4, 14)
11253
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[1]").WithArguments("int", "int*").WithLocation(2, 17)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\PropertyTests.cs (1)
2900
Diagnostic(ErrorCode.
ERR_StackAllocConversionNotPossible
, "stackalloc int[256]").WithArguments("int", "int*").WithLocation(4, 30)