D-Programming-Language/dmd — pull request #3188 by Ingrater (2014-02-03 08:25:09+00:00)
Title: Disambiguate type names for templates and arrays in cv8 debug symbols.

Currently dmd will use the same type name in cv8 debug symbols for multiple different types, because instead of using the fully qualified type name, it uses a short form.

The following code will trigger this issue
```
class Hashmap(K,V)
{
static struct Pair {
K key;
V value;
}

Pair[] m_Data;
}

void main(string[] args)
{
auto p = new Hashmap!(int, int)();
auto p2 = new Hashmap!(float, float)();
}
```

When compiling this code for windows x64 and then inspecting the resulting .pdb with Dia2Dump there will be two definitions of a type named "Pair[]". This then confuses the debugger. After the fix, the types will be named "main.Hashmap!(int, int).Pair[]" and "main.Hashmap!(float, float).Pair[]" respectivly.

This fix should apply to any debugger, visual studio specific improvements for the cv8 debug symbols will follow in another pull request.