www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12071] New: Algebraic won't take delegate returning structure

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

           Summary: Algebraic won't take delegate returning structure
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: Jesse.K.Phillips+D gmail.com



23:25:18 PST ---
The following code compiled with 2.064 but fails with an error with 2.065.

import std.variant;

void main() {
    Structure example() { return Structure.init; }

    auto m = VariantTest(&example);
}

struct Structure {}
alias Algebraic!(Structure delegate()) VariantTest;
------

C:\opt\dmd\windows\bin\..\..\src\phobos\std\variant.d(559): Error: static
assert  "Cannot store a Structure in a VariantN!(8u, Structure delegate()).
Valid types are (Structure delegate())"
C:\opt\dmd\windows\bin\..\..\src\phobos\std\variant.d(531):        instantiated
from here: opAssign!(Structure)
C:\opt\dmd\windows\bin\..\..\src\phobos\std\variant.d(600):        instantiated
from here: handler!(Structure delegate())
C:\opt\dmd\windows\bin\..\..\src\phobos\std\variant.d(550):        instantiated
from here: opAssign!(Structure delegate()) test.d(6):        instantiated from
here: __ctor!(Structure delegate())

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 03 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12071


Jesse Phillips <Jesse.K.Phillips+D gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Jesse.K.Phillips+D gmail.co
                   |                            |m



23:31:30 PST ---
Sorry, should say 2.065 beta 3

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 03 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12071


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

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



Caused by the std.variant enhancement:
https://github.com/D-Programming-Language/phobos/pull/1152

Rough fix:
https://github.com/D-Programming-Language/phobos/pull/1909

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 06 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12071




Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/1323bd4f00c2dec3fc41f105957a521a9daa84ae
fix Issue 12071 - Algebraic won't take delegate returning structure

Use `Variant` rather than `VariantN` in order to pack arguments and returned
value in opCall.

https://github.com/D-Programming-Language/phobos/commit/3089fb2d0bda4215aba712a3b6a7bef8a5a2a20c


[REG2.065a] Issue 12071 - Algebraic won't take delegate returning structure

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 13 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12071


Walter Bright <bugzilla digitalmars.com> changed:

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


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 13 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12071




Commit pushed to 2.065 at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/d430dd14d63c68aae3dae1fc0cacc4de264ff27a


[REG2.065a] Issue 12071 - Algebraic won't take delegate returning structure

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 15 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12071




Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/d430dd14d63c68aae3dae1fc0cacc4de264ff27a


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