https://issues.dlang.org/show_bug.cgi?id=20565

Walter Bright <bugzi...@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid

--- Comment #4 from Walter Bright <bugzi...@digitalmars.com> ---
Rewriting the bug example with functions instead of templates, an error is
correctly generated:

  void main()
  {
    {
        int temp() { return 3; }

        temp();
    }

    {
        int temp() { return 4; }

        temp(); // Error: declaration test.main.temp is already defined in
another scope in main at line 6
    }
  }

This suggests the obvious fix of extending the check for functions to include
template functions.

--

Reply via email to