[Issue 10619] Wrong local variable passed as alias arguments to templates
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Feb 27 17:35:30 UTC 2021
    
    
  
https://issues.dlang.org/show_bug.cgi?id=10619
Dlang Bot <dlang-bot at dlang.rocks> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
--- Comment #8 from Dlang Bot <dlang-bot at dlang.rocks> ---
@MoonlightSentinel updated dlang/dmd pull request #12236 "Fix 10619 - Wrong
local variable passed as alias arguments to templates" fixing this issue:
- 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