[Issue 10619] Wrong local variable passed as alias arguments to templates
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 6 03:40:51 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=10619
--- Comment #10 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #12253 "merge stable" was merged into master:
- 0c2d8bd2abf22476acf98065252559145c481fef by MoonlightSentinel:
Fix 10619 - Wrong local variable passed as alias arguments to templates
PR #12119 introduced `localNum` to differentiate between multiple
symbols with identical names. But `Dsymbol.equals` doesn't consider
this variable when comparing two Dsymbols.
This caused template semantic to treat the second instantiation of
`foo` as a duplice in the following example:
```d
void main()
{
{
int x = 1;
foo!x();
}
{
int x = 2;
foo!x();
}
}
```
https://github.com/dlang/dmd/pull/12253
--
More information about the Digitalmars-d-bugs
mailing list