<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59968>59968</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
compiler does not warn of shadowing of base class type alias
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
beached
</td>
</tr>
</table>
<pre>
Saw this code and I feel the compiler should be warning(luckily the implicit conversion warning does get diagnosed in this case) but the compiler, if possible, should have a warning to tell the user that their template parameter is shadowing an identifier in the base class
```cpp
#include <iostream>
struct Base {
using Type = int;
};
template <typename Type>
struct Derived : Base {
Type field;
};
int main() {
Derived<double> d;
d.field = 1.23;
std::cout << d.field << "\n";
return 0;
}
```
outputs
```
1
```
https://gcc.godbolt.org/z/e7EK39cnP
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U8uO6zYM_Rp5Q9zAlvKwF17MJBOg6KZA-wN60DFbWTIkagbTry_sZDLJRXEBg7JMnnNIyUfnTJeA2Ivdq9idKl14jKk3qO2IrjLRffZ_6g_gkTLY6BB0cPAbDIgeeESwcZrJY4I8xuIdGIQPnQKFi5CtL_Yf8p9rIU2zJ0sMNoZ3TJli-KoEFzHDBRkc6UuIGR1QuGnqjEJ2YAo_6Ql5BBpgjjmT8bhsbx2M-h1B37k5AqO_NlsyJuBRr1SUgHGavWaEWSc9IWMCypBH7eLHgtUByGFgGmhJhZXE6Ixgvc5Z1CdRv9zivr4-dp5vX6SiYH1xCEIdKWZOqCeh3h5hmVOxDK8Lpzi8fqW6khf9vz7nBXwCCizUV_Zw-n5f430MoY78OWPQE67Yu9hN5oSJ3tGBUC8_SQLAVW0g9O4XWtdIgWHSFIRsl8t5ormJCHV0sSxXo97gm3GpcJtVZZ2s2Uj1lMzshHoR6sXGwstEQh0fEOtWSCl2x7Asd2hCLilA_dT789U8ThALz4Uz_G9J8wvgNY7Mc176lGchzxdrN5foTPS8ieki5PlfIc94ePtddTb8cYVUrleuU52usG_2B7VT3U7uqrGXQ3MwnTHG2G3TGdc23R4P-05h09WtbCvqZS1V3TSy2dc7ud1sW2yVdk2zbfeD2Q5iW-OkyW-8f5-WDirKuWC_67p9W3lt0OfV4VIG_IA1uZ7hqUr9gvlhyiWLbe0pc_5mYWKP_d3iq01D5NVbEIcHp8ThwRew_ISgPelcleT7nw6LeCxmY-Mk5HmRui0_5hT_RstCntcGs5DndYD_AgAA___eimeg">