36 references to ERR_BadGetEnumerator
Microsoft.CodeAnalysis.CSharp (2)
Binder\ForEachLoopBinder.cs (1)
864
diagnostics.Add(isAsync ? ErrorCode.ERR_BadGetAsyncEnumerator : ErrorCode.
ERR_BadGetEnumerator
, _syntax.Expression.Location, getEnumeratorMethod.ReturnType, getEnumeratorMethod);
Errors\ErrorFacts.cs (1)
720
case ErrorCode.
ERR_BadGetEnumerator
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
CodeGen\CodeGenForEachTests.cs (8)
3478
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new C()").WithArguments("C.Enumerator", "Extensions.GetEnumerator(C)").WithLocation(7, 27)
3514
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new C()").WithArguments("C.Enumerator", "C.GetEnumerator()").WithLocation(7, 27)
3591
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new C()").WithArguments("C.Enumerator1", "C.GetEnumerator()").WithLocation(7, 27)
3982
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new C()").WithArguments("int", "Extensions2.GetEnumerator(C)").WithLocation(9, 27)
4418
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new C()").WithArguments("C.Enumerator", "Extensions.GetEnumerator(C)").WithLocation(7, 27));
4460
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new C()").WithArguments("C.Enumerator1", "C.GetEnumerator()").WithLocation(7, 27)
5023
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new C()").WithArguments("int", "N1.N2.Extensions.GetEnumerator(N1.N2.N3.C)").WithLocation(25, 39));
5079
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new C()").WithArguments("int", "N3.Extensions.GetEnumerator(N1.C)").WithLocation(13, 31));
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IForEachLoopStatement.cs (1)
4846
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Program()").WithArguments("bool", "Extensions.GetEnumerator(Program)").WithLocation(7, 31)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (25)
Semantics\BetterCandidates.cs (1)
273
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "c").WithArguments("MyEnumerator", "MyCollection.GetEnumerator()").WithLocation(6, 27)
Semantics\ForEachTests.cs (23)
327
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "e").WithArguments("Enumerator?", "Enumerable.GetEnumerator()"));
360
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"));
393
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"));
424
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"));
455
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"));
487
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"),
524
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"));
557
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"));
589
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()").WithLocation(6, 27)
621
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"));
653
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"),
688
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"));
719
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"));
752
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new Enumerable()").WithArguments("Enumerator", "Enumerable.GetEnumerator()"));
1022
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "e").WithArguments("dynamic", "DynamicEnumerable.GetEnumerator()"));
2057
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new ValidBaseTest.Derived5()").WithArguments("void", "ForEachTest.ValidBaseTest.Derived5.GetEnumerator()").WithLocation(35, 31));
2067
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "new ValidBaseTest.Derived5()").WithArguments("void", "ForEachTest.ValidBaseTest.Derived5.GetEnumerator()").WithLocation(35, 31));
2463
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "e1").WithArguments("System.Collections.Generic.IEnumerator<C>", "System.Collections.Generic.IEnumerable<C>.GetEnumerator()"),
2530
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "e1").WithArguments("System.Collections.Generic.IEnumerator<C>", "System.Collections.Generic.IEnumerable<C>.GetEnumerator()"),
2597
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "e1").WithArguments("System.Collections.Generic.IEnumerator<C>", "System.Collections.Generic.IEnumerable<C>.GetEnumerator()"),
2713
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "e1").WithArguments("System.Collections.IEnumerator", "System.Collections.IEnumerable.GetEnumerator()"),
2773
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "e1").WithArguments("System.Collections.IEnumerator", "System.Collections.IEnumerable.GetEnumerator()"),
2833
Diagnostic(ErrorCode.
ERR_BadGetEnumerator
, "e1").WithArguments("System.Collections.IEnumerator", "System.Collections.IEnumerable.GetEnumerator()"),
Semantics\SemanticErrorTests.cs (1)
7967
new ErrorDescription[] { new ErrorDescription { Code = (int)ErrorCode.
ERR_BadGetEnumerator
, Line = 50, Column = 24 } });