From 577c5b21c3d295b7ba357b51e7ae981e2f8af237 Mon Sep 17 00:00:00 2001 From: Kevin Glynn Date: Wed, 14 Jul 2010 13:16:15 -0500 Subject: [PATCH] hack: Ignore duplicate fields (probably due to insufficient #iffery treatment we are processing extra lines that we shouldn't) --- CSharpTranslator/antlr2/Translator/TypeRep.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CSharpTranslator/antlr2/Translator/TypeRep.cs b/CSharpTranslator/antlr2/Translator/TypeRep.cs index 5d39e31..c447633 100644 --- a/CSharpTranslator/antlr2/Translator/TypeRep.cs +++ b/CSharpTranslator/antlr2/Translator/TypeRep.cs @@ -424,7 +424,14 @@ namespace RusticiSoftware.Translator FieldsD = new Hashtable(); foreach (FieldRepTemplate ft in template.Fields) { - FieldsD.Add(ft.Name, FieldRep.newInstance(ft, uPath)); + try + { + FieldsD.Add(ft.Name, FieldRep.newInstance(ft, uPath)); + } + catch (Exception x) + { + Console.Out.WriteLine("Ignore duplicate field (#iffery?)"); + } } Casts = new CastRep[template.Casts.Length]; for (int i = 0; i < template.Casts.Length; i++)