January 03, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9266

           Summary: Cannot define two Tuple objects.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: repeatedly@gmail.com


--- Comment #0 from Masahiro Nakagawa <repeatedly@gmail.com> 2013-01-03 11:06:27 PST ---
I hit this issue in msgpack-d with 2.061.

Following Tuple definition causes compilation error:

  Tuple!(ulong) a, b;  //  Tuple!(ulong) a; works

Error message:

  Assertion failed: (0), function syntaxCopy, file declaration.c, line 183.

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


Masahiro Nakagawa <repeatedly@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 04, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9266


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc


--- Comment #1 from bearophile_hugs@eml.cc 2013-01-03 16:32:14 PST ---
A little minimized:


template Foo(T...) {
    alias T Foo;
}
struct Bar(U...) {
    template spam(U...) {
        alias Foo!(FieldSpec!(U[0])) spam;
    }
    alias spam!U baz;
}
int main() {
    Bar!(ulong) a, b;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 04, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9266


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

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


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2013-01-03 19:42:28 PST ---
This change introduces the regression.

https://github.com/D-Programming-Language/dmd/commit/dd79dd73f0a1553ff4237d759cea92e7222dccbb

But, I can't understand why the assertion is invoked...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 05, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9266



--- Comment #3 from Artem Tarasov <lomereiter@gmail.com> 2013-01-04 16:49:30 PST ---
Further reduced test case:

template Foo(T...) {
    T Foo;
}

struct Bar()
{
    alias Foo!int f;
}

void main() {
    Bar!() a, b;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 09, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9266


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #4 from Kenji Hara <k.hara.pg@gmail.com> 2013-01-08 17:30:31 PST ---
(In reply to comment #3)
> Further reduced test case:
> 
> template Foo(T...) {
>     T Foo;
> }
> 
> struct Bar()
> {
>     alias Foo!int f;
> }
> 
> void main() {
>     Bar!() a, b;
> }

Thanks for your work!

A pull request to fix the issue: https://github.com/D-Programming-Language/dmd/pull/1447

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 09, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9266



--- Comment #5 from Masahiro Nakagawa <repeatedly@gmail.com> 2013-01-08 19:45:50 PST ---
> bearophile, Artem

Thanks for minimizing the test case!

> kenji

LGTM!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9266


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #6 from Kenji Hara <k.hara.pg@gmail.com> 2013-01-09 16:11:52 PST ---
https://github.com/D-Programming-Language/dmd/commit/8587727bccc99f59ec47b3626e9c3200e9515432

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 13, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9266


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim@maxim-fomin.ru


--- Comment #7 from Kenji Hara <k.hara.pg@gmail.com> 2013-02-12 17:07:48 PST ---
*** Issue 9499 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home