From 8faedcd10a0b8d22dc1186c9a6076d43c5520f33 Mon Sep 17 00:00:00 2001 From: Kevin Glynn Date: Wed, 2 Mar 2011 19:36:48 +0100 Subject: [PATCH] comment out broken IsA definition, rely on working version in base. Be explicit that typevars can ac like Object. --- .../CS2JTemplate/TranslationTemplate.cs | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/CSharpTranslator/antlr3/src/CS2JTranslator/CS2JTemplate/TranslationTemplate.cs b/CSharpTranslator/antlr3/src/CS2JTranslator/CS2JTemplate/TranslationTemplate.cs index 1ba930e..31d91cb 100644 --- a/CSharpTranslator/antlr3/src/CS2JTranslator/CS2JTemplate/TranslationTemplate.cs +++ b/CSharpTranslator/antlr3/src/CS2JTranslator/CS2JTemplate/TranslationTemplate.cs @@ -2730,19 +2730,19 @@ namespace Twiglet.CS2J.Translator.TypeRep } // Returns true if we are a subclass of other, or implements its interface - public override bool IsA (TypeRepTemplate other, DirectoryHT AppEnv) { - InterfaceRepTemplate i = other as InterfaceRepTemplate; - if (i == null) - { - return false; - } - if (i.TypeName == this.TypeName) - { - return true; - } - return base.IsA(other,AppEnv); - } - +// public override bool IsA (TypeRepTemplate other, DirectoryHT AppEnv) { +// InterfaceRepTemplate i = other as InterfaceRepTemplate; +// if (i == null) +// { +// return false; +// } +// if (i.TypeName == this.TypeName) +// { +// return true; +// } +// return base.IsA(other,AppEnv); +// } +// public override ResolveResult Resolve(String name, bool forWrite, DirectoryHT AppEnv) { @@ -3419,6 +3419,7 @@ namespace Twiglet.CS2J.Translator.TypeRep public TypeVarRepTemplate (string typeName) : base(typeName) { + Inherits = new String[] { "System.Object" }; } public TypeVarRepTemplate (TypeVarRepTemplate copyFrom) : base(copyFrom) @@ -3442,7 +3443,7 @@ namespace Twiglet.CS2J.Translator.TypeRep } public override bool IsA (TypeRepTemplate other, DirectoryHT AppEnv) { - return false; + return base.IsA(other, AppEnv); } #region Equality