Internal Error: Modify enumerated Collection

IDE: Visual Studio X/Fire
Version: 10.0.0.2407 (develop)
Target (If relevant): Net
Description:
When compiling the project I have been using for testing the differences between Swift and Silver, I get this error at the end of the log.

I haven’t reported this earlier because until .2407 the log had >700 errors (mostly where Equals constraints, but still).

If there is more Information I can give, ask.

Expected Behavior:
No Internal Error
Actual Behavior:
“”"
E: Internal error: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.Dictionary2+Enumerator[TKey,TValue].MoveNext () [0x00013] in <c960d00aa53f46b89bb10964fa2ccbed>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator2[TSource,TResult].MoveNext () [0x00059] in <97af2e42b3194f12a5bb6878797ababa>:0
at System.Linq.Enumerable+WhereEnumerableIterator1[TSource].MoveNext () [0x0004e] in <97af2e42b3194f12a5bb6878797ababa>:0 at RemObjects.Oxygene.Code.IdentifierExpressionTransform.TrySpellCheckIdentifier (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Identifier id, System.Collections.Generic.IEnumerable1[RemObjects.Oxygene.Code.FixIt]& aFixes) [0x00300] in :0
at RemObjects.Oxygene.Code.IdentifierExpressionTransform.ResolveRootExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.ResolvedIdentifierExpressionBuilderEx id, RemObjects.Oxygene.Code.IDFlags aIDFlags, RemObjects.Oxygene.Code.BaseType aTarType) [0x0161d] in :0
at RemObjects.Oxygene.Code.IdentifierExpressionTransform.ResolveExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.IdentifierExpression id, RemObjects.Oxygene.Code.IDFlags aIDFlags, RemObjects.Oxygene.Code.BaseType aTarType) [0x000ae] in :0
at RemObjects.Oxygene.Code.CallExpressionTransform.ResolveExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.CallExpression incall, RemObjects.Oxygene.Code.CallMode aCM) [0x00c9a] in :0
at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Expression element) [0x006be] in :0
at RemObjects.Oxygene.Code.UnaryExpressionTransform.ResolveExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.UnaryExpression unaryExpression) [0x001fd] in :0
at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Expression element) [0x006ea] in :0
at RemObjects.Oxygene.Code.Compiler.Compiler.CheckDefined (RemObjects.Oxygene.Code.Compiler.ITypeResolutionScope aScope, RemObjects.Oxygene.Code.Expression aVal, System.Collections.Generic.HashSet1[T] aExtra, System.Collections.Immutable.ImmutableSortedSet1[System.String]& aPlat) [0x00162] in :0
at RemObjects.Oxygene.Code.ElementsSyntaxModel.IntCreateTypeFor (RemObjects.Oxygene.Code.Compiler.Compiler fCompiler, System.String aOriginalName, RemObjects.Oxygene.Analysis.SLinkedListNode1[T] aItems, RemObjects.Oxygene.Code.IParsedType aNestedIn, System.Action2[T1,T2] aAdd) [0x000a9] in :0
at RemObjects.Oxygene.Code.ElementsSyntaxModel.CreateTypeFor (System.String aOriginalName, RemObjects.Oxygene.Analysis.SLinkedListNode`1[T] aItems) [0x0003c] in :0
at RemObjects.Oxygene.Code.ElementsSyntaxModel.IntFillTypes () [0x00f6c] in :0
at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in :0
at System.Threading.Tasks.Task.Execute () [0x00000] in :0
Project ‘ConsoleApplication2’ failed to build.
Solution ‘ConsoleApplication2’ failed to build all projects.
“”"
Steps:
⁇?

pretty sure we’ll need a full test case for this one…

Unfortunately this will be hard to reduce.

My original case is the Swift stdlib (Swift-checkout/stdlib/public/core/.*)
However, I have been modifying it to remove stdlib-only attributes, etc. that are unnecessary for an initial build.

@dbroggi the full thing is fine too; if needed we can keep it secret.

No secrecy needed, it’s just that my default state is to not disclose anything, as habit.

I have put the code I have been attempting to compile on my GitHub here.

To repro:

  1. Clone repository here
  2. Create new project.
  3. Project >> Add Existing File(s)
  4. Navigate to checkout/swift/stdlib/public/core
  5. Select All
  6. Add to Project

Thanks, logged as bugs://82688

Oke. I’ve logged it, but since I’m off for a few days it probably won’t be fixed before next week.

bugs://82688 got closed with status fixed.