Permalink
Browse files

Fix iterator usage in previous commit

  • Loading branch information...
1 parent 5792d5b commit b12f0e728eb2b91aaaf84d5f90f35b3a6bb62663 @sorear committed Oct 29, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Kernel.cs
View
@@ -466,8 +466,10 @@ sealed class EmitUnit {
var fields = new Dictionary<string,FieldInfo>();
foreach (FieldInfo fi in type.GetFields())
fields[fi.Name] = fi;
- foreach (object k in constants.Keys)
- constants[k] = fields[constants[k].Name];
+ var rconstants = new Dictionary<object,FieldInfo>();
+ foreach (var kv in constants)
+ rconstants[kv.Key] = fields[kv.Value.Name];
+ constants = rconstants;
return type;
}

0 comments on commit b12f0e7

Please sign in to comment.