Thread overview
[Issue 3001] New: Templated types within a mixin not reinstantiated properly for new instantiation
Jun 11, 2009
Matti Niemenmaa
Jun 11, 2009
Christopher Wright
Blockers (was Re: [Issue 3001])
Jun 12, 2009
Matti Niemenmaa
Jun 12, 2009
Stewart Gordon
Jun 23, 2009
Kagamin
Sep 16, 2009
Don
Jul 03, 2011
yebblies
May 17, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3001

           Summary: Templated types within a mixin not reinstantiated
                    properly for new instantiation
           Product: D
           Version: 1.043
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: matti.niemenmaa+dbugzilla@iki.fi


Tricky to summarize. The following doesn't compile:

========
struct TemplateStruct(int x) {}

template T() {
    struct S { TemplateStruct!(x) t; }

    void foo() {
        TemplateStruct!(x) t;
        S s;
        s.t = t;
    }
}

class Super(int x) { mixin T!(); }

void main() {
    Super!(1) a;
    Super!(2) b;
}

========

Errors:

arst.d(11): Error: cannot implicitly convert expression (t) of type
TemplateStruct!(2) to TemplateStruct!(1)
arst.d(19): Error: template instance arst.Super!(2) error instantiating

The TemplateStruct in S seems to be referring to the first instantiation of Super in both instantiations, although the type should be different.

Passing x to T makes it work. This also works in LDC, but not DMD (tried 1.043
and 1.045).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 11, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3001


Matti Niemenmaa <matti.niemenmaa+dbugzilla@iki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |blocker




--- Comment #1 from Matti Niemenmaa <matti.niemenmaa+dbugzilla@iki.fi>  2009-06-11 09:32:40 PDT ---
I'm bumping this to 'blocker' because it's preventing me from using DMD for my project.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 11, 2009
> --- Comment #1 from Matti Niemenmaa <matti.niemenmaa+dbugzilla@iki.fi>  2009-06-11 09:32:40 PDT ---
> I'm bumping this to 'blocker' because it's preventing me from using DMD for my
> project.
> 

I think we need clarification on the definition and usage of "blocker". I typically would use it to mean that DMD cannot be released until the bug is fixed. Other people seem to be using it in a more liberal sense.
June 12, 2009
Christopher Wright wrote:
>> --- Comment #1 from Matti Niemenmaa <matti.niemenmaa+dbugzilla@iki.fi>  2009-06-11 09:32:40 PDT ---
>> I'm bumping this to 'blocker' because it's preventing me from using DMD for my project.
>>
> 
> I think we need clarification on the definition and usage of "blocker". I typically would use it to mean that DMD cannot be released until the bug is fixed. Other people seem to be using it in a more liberal sense.

http://d.puremagic.com/issues/page.cgi?id=fields.html#importance says "[b]locks development and/or testing work." It's not entirely clear whether that refers to DMD development or development of anything else using DMD.

I think I might've actually used to use your definition of "blocks DMD" but have since lapsed into "blocks my work"...

According to the list of all new and old blockers, usage varies:

http://d.puremagic.com/issues/buglist.cgi?query_format=advanced&bug_severity=blocker&order=bugs.bug_status,bugs.bug_id
June 12, 2009
Matti Niemenmaa wrote:
<snip>
> http://d.puremagic.com/issues/page.cgi?id=fields.html#importance says "[b]locks development and/or testing work." It's not entirely clear whether that refers to DMD development or development of anything else using DMD.
<snip>

I can see there being at least three possible levels to distinguish in defining what a "blocker" is:

- blocks development of DMD
- blocks development of derivative works of DMD and/or third-party compilers
- blocks use of D or DMD

Maybe there are others....

Stewart.
June 23, 2009
Stewart Gordon Wrote:

> I can see there being at least three possible levels to distinguish in defining what a "blocker" is:
> 
> - blocks development of DMD
> - blocks development of derivative works of DMD and/or third-party compilers
> - blocks use of D or DMD
> 
> Maybe there are others....
> 
> Stewart.

Blocker blocks usage of software. In the case of compiler it blocks development with this compiler. Release blockers are marked differently, see d1.0blocker flag in bug 340. Or you can create "release" RFE and mark bugs blocking it.
September 16, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3001


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au
           Severity|blocker                     |regression


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2009-09-16 04:22:59 PDT ---
This worked on 1.010, but did not work in 1.020. Bumping up to regression.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 03, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=3001


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies@gmail.com
         Resolution|                            |FIXED


--- Comment #3 from yebblies <yebblies@gmail.com> 2011-07-04 02:23:39 EST ---
This works with current dmd (1.068 & 2.053)

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