www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10067] New: [REG] Recursive template instantation

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10067

           Summary: [REG] Recursive template instantation
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: dmitry.olsh gmail.com


--- Comment #0 from Dmitry Olshansky <dmitry.olsh gmail.com> 2013-05-12
04:38:59 PDT ---
Used to work in 2.062. Fails in current git HEAD.
Found in unittests for new std.uni.

struct assumeSize(alias F)
{
}

template useItemAt(size_t idx, T)
{
void impl(){ }
alias assumeSize!(impl)  useItemAt;
}

useItemAt!(0, char) mapS;


DMD's output:

reg_template.d(9): Error: alias reg_template.useItemAt!(0, char).useItemAt
recursive alias declaration
reg_template.d(12): Error: template instance reg_template.useItemAt!(0, char)
error instantiating

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 12 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10067


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-05-12 07:54:34 PDT ---
This regression is caused by the commit:
https://github.com/D-Programming-Language/dmd/commit/661ac097995a79674a07db38469e58e5cf9e530a

Compiler fix for the issue:
https://github.com/D-Programming-Language/dmd/pull/2026

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 12 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10067



--- Comment #2 from github-bugzilla puremagic.com 2013-05-12 12:01:43 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5f90c9f1887b6805b075d390b8cba414559c30e2
fix Issue 10067 - Recursive template instantiation

https://github.com/D-Programming-Language/dmd/commit/828859bca0be2daf7c7accde8e15697de610380a
Merge pull request #2026 from 9rnsr/fix10067

[REG2.063a] Issue 10067 - Recursive template instantation

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 12 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10067


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 17 2013