From 8e788fbb4658f40e868090f326db6243ced1fb34 Mon Sep 17 00:00:00 2001 From: Kevin Glynn Date: Tue, 1 Mar 2011 11:42:09 +0100 Subject: [PATCH] Make Iterable translation work in generic types --- .../CS2JTemplate/TranslationTemplate.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/CSharpTranslator/antlr3/src/CS2JTranslator/CS2JTemplate/TranslationTemplate.cs b/CSharpTranslator/antlr3/src/CS2JTranslator/CS2JTemplate/TranslationTemplate.cs index 34e573b..e261e2a 100644 --- a/CSharpTranslator/antlr3/src/CS2JTranslator/CS2JTemplate/TranslationTemplate.cs +++ b/CSharpTranslator/antlr3/src/CS2JTranslator/CS2JTemplate/TranslationTemplate.cs @@ -466,7 +466,7 @@ namespace Twiglet.CS2J.Translator.TypeRep { if (ElementType != null) { - TemplateUtilities.SubstituteInType(ElementType, args); + ElementType = TemplateUtilities.SubstituteInType(ElementType, args); } base.Apply(args); } @@ -2595,10 +2595,14 @@ namespace Twiglet.CS2J.Translator.TypeRep } if (Indexers != null) { - foreach(IndexerRepTemplate i in Indexers) - { - i.Apply(args); - } + foreach (IndexerRepTemplate i in Indexers) + { + i.Apply(args); + } + } + if (Iterable != null) + { + Iterable.Apply(args); } base.Apply(args); }