From 6d1267a88329bafd2d2e6c50bcc6a08fc1b612db Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sun, 17 Feb 2013 15:07:24 -0600 Subject: [PATCH] Cannot assign a value to foreach iteration variable in C# --- Antlr4.Runtime/Atn/PredictionMode.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Antlr4.Runtime/Atn/PredictionMode.cs b/Antlr4.Runtime/Atn/PredictionMode.cs index fa104645c..e58d4fbfa 100644 --- a/Antlr4.Runtime/Atn/PredictionMode.cs +++ b/Antlr4.Runtime/Atn/PredictionMode.cs @@ -260,8 +260,8 @@ namespace Antlr4.Runtime.Atn ATNConfigSet dup = new ATNConfigSet(); foreach (ATNConfig c in configs) { - c = c.Transform(c.GetState(), SemanticContext.None); - dup.AddItem(c); + ATNConfig config = c.Transform(c.GetState(), SemanticContext.None); + dup.AddItem(config); } configs = dup; }