www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11818] New: Ternary operator not allowed in a value parameter anymore

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

           Summary: Ternary operator not allowed in a value parameter
                    anymore
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrei erdani.com


--- Comment #0 from Andrei Alexandrescu <andrei erdani.com> 2013-12-25 16:16:55
PST ---
This used to work:

enum E { e0, e1 }

struct SortedRange
{
    void fun(E e = true ? E.e0 : E.e1)()
    {
    }
}

void main(string[] args)
{
    SortedRange s;
    s.fun();
}

Now I get:

Error: expression true ? e0 : e1 is not a valid template value argument

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 25 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11818


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-12-26 04:57:03 PST ---
https://github.com/D-Programming-Language/dmd/pull/3033

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 26 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11818



--- Comment #2 from github-bugzilla puremagic.com 2013-12-26 07:44:09 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ad4d1de964d1b5593cf7ad88cae9f915d79d80ab
fix Issue 11818 - Ternary operator not allowed in a value parameter anymore

https://github.com/D-Programming-Language/dmd/commit/9416f48090f55dfdf348b8d6bde2b24449a471b3
Merge pull request #3033 from 9rnsr/fix11818

[REG2.064] Issue 11818 - Ternary operator not allowed in a value parameter
anymore

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 26 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11818


yebblies <yebblies gmail.com> changed:

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


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 26 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11818



--- Comment #3 from github-bugzilla puremagic.com 2013-12-31 04:13:42 PST ---
Commit pushed to 2.065 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/230c1dc950d9f119bff31a43677f07e9bf4da598
Merge pull request #3033 from 9rnsr/fix11818

[REG2.064] Issue 11818 - Ternary operator not allowed in a value parameter
anymore

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 31 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11818



--- Comment #4 from github-bugzilla puremagic.com 2014-01-15 09:44:53 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/230c1dc950d9f119bff31a43677f07e9bf4da598
Merge pull request #3033 from 9rnsr/fix11818

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