[Issue 10619] Wrong local variable passed as alias arguments to templates
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 28 12:11:41 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=10619
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #12236 "Fix 10619 - Wrong local variable passed as alias
arguments to templates" was merged into stable:
- 9f980f52e6d798c06e6b7da55e12cf25882cc757 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/12236
--
More information about the Digitalmars-d-bugs
mailing list