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


--- Comment #0 from Jesse Phillips <Jesse.K.Phillips+D gmail.com> 2014-02-03
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


--- Comment #1 from Jesse Phillips <Jesse.K.Phillips+D gmail.com> 2014-02-03
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


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2014-02-06 00:23:13 PST ---
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



--- Comment #3 from github-bugzilla puremagic.com 2014-02-13 19:18:39 PST ---
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
Merge pull request #1909 from 9rnsr/fix12071

[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



--- Comment #4 from github-bugzilla puremagic.com 2014-02-15 19:23:10 PST ---
Commit pushed to 2.065 at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/d430dd14d63c68aae3dae1fc0cacc4de264ff27a
Merge pull request #1909 from 9rnsr/fix12071

[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



--- Comment #5 from github-bugzilla puremagic.com 2014-02-27 20:13:34 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/d430dd14d63c68aae3dae1fc0cacc4de264ff27a
Merge pull request #1909 from 9rnsr/fix12071

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