do not go out of bounds

This commit is contained in:
ryuukk 2023-02-14 17:27:37 +01:00
parent f4d0b2e548
commit 3269a2c190
1 changed files with 7 additions and 2 deletions

View File

@ -186,8 +186,13 @@ DSymbol* createTypeWithTemplateArgs(DSymbol* type, TypeLookup* lookup, VariableC
if (part.kind == CompletionKind.typeTmpParam)
{
scope(exit) count++;
warning("building mapping for: ", part.name, " chain: ", ti.args[count].chain);
if (count >= ti.args.length)
{
warning("too many T for args available, investigate");
continue;
}
warning("building mapping for: ", part.name," count: ", count, "/", ti.args.length, " chain: ");
warning(" ", ti.args[count].chain);
auto key = part.name;
DSymbol* first;