74 references to ERR_StructLayoutCycle
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
935
or ErrorCode.
ERR_StructLayoutCycle
Symbols\Source\SourceMemberContainerSymbol.cs (2)
2686
diagnostics.Add(ErrorCode.
ERR_StructLayoutCycle
, symbol.GetFirstLocation(), symbol, type);
3008
diagnostics.Add(ErrorCode.
ERR_StructLayoutCycle
, f.GetFirstLocation(), f, type);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenTupleTest.cs (1)
22252
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("S.field", "(S, S)").WithLocation(4, 19)
Emit\CompilationEmitTests.cs (1)
1792
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("Usage.x", "Container<Usage>").WithLocation(3, 29)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (25)
FlowAnalysis\FlowDiagnosticTests.cs (5)
942
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "a").WithArguments("A.a", "A").WithLocation(4, 7),
984
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("C<T>.x", "D<T>").WithLocation(14, 17),
987
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("D<T>.x", "C<D<T>>").WithLocation(18, 20),
990
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("A<T>.x", "A<A<T>>").WithLocation(4, 20),
1005
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("E<T>.x", "E<E<T>>").WithLocation(23, 26),
FlowAnalysis\StructTests.cs (20)
219
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "P").WithArguments("S<T>.P", "S<T[]>?").WithLocation(3, 13));
249
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("A<T>.x", "A<A<T>>").WithLocation(4, 13),
252
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("C<T>.x", "D<T>").WithLocation(14, 10),
255
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("D<T>.x", "C<D<T>>").WithLocation(18, 13)
281
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("A<T>.x", "A<A<T>>").WithLocation(4, 13)
312
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "xz").WithArguments("Y.xz", "X<Z>").WithLocation(12, 10),
315
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "xy").WithArguments("Z.xy", "X<Y>").WithLocation(18, 10)
349
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("A<T>.x", "A<A<T>>").WithLocation(4, 13),
352
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("C<T>.x", "C<C<T>>").WithLocation(9, 13),
355
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "z").WithArguments("B<T>.z", "B<T>").WithLocation(16, 10)
389
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("A<T>.x", "A<A<T>>").WithLocation(4, 13),
392
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("C<T>.x", "C<C<T>>").WithLocation(9, 13),
395
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "z").WithArguments("B<T>.z", "B<T>").WithLocation(14, 10)
429
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("A<T>.x", "A<A<T>>").WithLocation(4, 13),
432
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("C<T>.x", "C<C<T>>").WithLocation(9, 13),
435
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "z").WithArguments("B<T>.z", "B<T>").WithLocation(15, 10)
466
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("A<T>.x", "A<A<T>>").WithLocation(4, 20),
469
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("C<T>.x", "D<T>").WithLocation(14, 17),
472
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("D<T>.x", "C<D<T>>").WithLocation(18, 20)
498
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("A<T>.x", "A<A<T>>").WithLocation(4, 20)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (21)
Semantics\GenericConstraintsTests.cs (12)
3603
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<MyStruct<MyStruct<T>>>").WithLocation(4, 46));
3627
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<T>").WithLocation(4, 26),
3633
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("YourStruct<T>.field", "MyStruct<T>").WithLocation(9, 24));
3658
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<MyStruct<MyStruct<T>>>").WithLocation(4, 46));
3683
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<MyStruct<MyStruct<T>>>").WithLocation(4, 46),
3711
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<MyStruct<MyStruct<T>>>").WithLocation(5, 46),
3739
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<MyStruct<MyStruct<T>>>").WithLocation(4, 46),
3767
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<MyStruct<MyStruct<T>>>").WithLocation(5, 46),
3799
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<MyStruct<MyStruct<T>>>").WithLocation(6, 52),
3834
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<MyStruct<MyStruct<T>>>").WithLocation(7, 52),
3866
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<MyStruct<MyStruct<T>>>").WithLocation(4, 46),
3894
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "field").WithArguments("MyStruct<T>.field", "YourStruct<MyStruct<MyStruct<T>>>").WithLocation(4, 46),
Semantics\NullableReferenceTypesTests.cs (2)
88040
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "Next").WithArguments("S.Next", "S").WithLocation(4, 16));
88135
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "F").WithArguments("S.F", "S").WithLocation(4, 16),
Semantics\RecordStructTests.cs (3)
2302
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "c").WithArguments("C.c", "C").WithLocation(2, 19)
5916
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "X").WithArguments("R.X", "R").WithLocation(4, 14)
5940
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "X").WithArguments("R.X", "R").WithLocation(2, 19)
Semantics\RefFieldTests.cs (1)
9886
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "Next").WithArguments("R<T>.Next", "R<T>").WithLocation(5, 21),
Semantics\StructsTests.cs (2)
39
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "a").WithArguments("A.a", "A").WithLocation(4, 7),
616
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "recursiveFld").WithArguments("X.recursiveFld", "X?")
Semantics\UnsafeTests.cs (1)
6828
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "s").WithArguments("S.s", "S").WithLocation(13, 14),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (23)
Symbols\SymbolErrorTests.cs (23)
8820
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "F").WithArguments("B.F", "C").WithLocation(7, 7),
8823
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "G").WithArguments("C.G", "B").WithLocation(12, 7),
8826
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "F").WithArguments("D<T>.F", "D<D<object>>").WithLocation(16, 18),
8829
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "G").WithArguments("H<T>.G", "G").WithLocation(32, 7),
8832
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "F").WithArguments("G.F", "H<G>").WithLocation(28, 10),
8835
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "F").WithArguments("A.F", "A").WithLocation(3, 7),
8941
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "P").WithArguments("A.P", "A"),
8944
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "P").WithArguments("B.P", "C"),
8947
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "Q").WithArguments("C.Q", "B"),
8950
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "P").WithArguments("D<T>.P", "D<D<object>>"),
8953
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "P").WithArguments("G.P", "H<G>"),
8956
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "Q").WithArguments("H<T>.Q", "G"),
9017
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "xz").WithArguments("Y.xz", "X<Z>").WithLocation(9, 17),
9020
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "xy").WithArguments("Z.xy", "X<Y>").WithLocation(14, 17),
9053
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("W<T>.x", "X<W<W<T>>>"),
9086
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "F").WithArguments("S1<T, U>.F", "S1<object, object>").WithLocation(3, 24),
9089
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "F").WithArguments("S2<T, U>.F", "S2<U, T>").WithLocation(7, 14),
9146
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("S1<T>.x", "S1<S1<T>.C>").WithLocation(8, 18),
9149
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("S2<T>.x", "S2<S2<T>.S>").WithLocation(13, 18),
9152
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("S3<T>.x", "S3<S3<T>.I>").WithLocation(18, 18),
9155
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("S4<T>.x", "S4<S4<T>.D>").WithLocation(23, 18),
9158
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("S5<T>.x", "S5<S5<T>.E>").WithLocation(28, 18),
9161
Diagnostic(ErrorCode.
ERR_StructLayoutCycle
, "x").WithArguments("S6<T>.x", "S6<T[]>").WithLocation(32, 20),