1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

Don't return null - return UnknownRepType

This commit is contained in:
Kevin Glynn 2011-03-02 21:42:19 +01:00
parent 8faedcd10a
commit a272b8105d

View File

@ -2045,8 +2045,8 @@ namespace Twiglet.CS2J.Translator.TypeRep
throw new Exception("buildTypeList: Cannot parse " + types);
}
}
typeRep = AppEnv.Search(this.Uses, typeName + (tyArgs.Count > 0 ? "'" + tyArgs.Count.ToString() : ""));
if (typeRep != null && tyArgs.Count > 0)
typeRep = AppEnv.Search(this.Uses, typeName + (tyArgs.Count > 0 ? "'" + tyArgs.Count.ToString() : ""), new UnknownRepTemplate(typeName));
if (!typeRep.IsUnknownType && tyArgs.Count > 0)
{
typeRep = typeRep.Instantiate(tyArgs);
}