Bug 11818 – Ternary operator not allowed in a value parameter anymore

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-25T16:16:00Z
Last change time
2014-01-15T09:44:53Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
andrei

Comments

Comment #0 by andrei — 2013-12-25T16:16:55Z
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
Comment #1 by k.hara.pg — 2013-12-26T04:57:03Z
Comment #2 by github-bugzilla — 2013-12-26T07:44:09Z
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
Comment #3 by github-bugzilla — 2013-12-31T04:13:42Z
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
Comment #4 by github-bugzilla — 2014-01-15T09:44:53Z