[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2022-01-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 Basile-z changed: What|Removed |Added See Also||https://issues.dlang.org/sh |

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-06-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #19 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/30d5c4b3028d827c285a8bec682ed1acc69e1a57 fix Issue 18115 - [REG2.078-b1] case where

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-05-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 Basile B. changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-05-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 Basile B. changed: What|Removed |Added CC||turkey...@gmail.com ---

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #17 from Walter Bright --- I had an idea: https://github.com/dlang/dmd/pull/8259 --

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 Walter Bright changed: What|Removed |Added Keywords|CTFE|rejects-valid ---

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #15 from Walter Bright --- Tracing this through the compiler, the trouble is more subtle. int test() { if (test.stringof.length > 6 && test.stringof[$-7..$] == "1234567") {} return 0; }

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-01-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #14 from Rainer Schuetze --- The problem here is not the short-circuiting of semantic analysis, but the const-folding now done on the second operand of "&&" that predicts a runtime error if the code is actually

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2018-01-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #13

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #12 from Basile B. --- Before closing, would it be possible to gag the error if the LHS evaluates to false ? --

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #11 from Rainer Schuetze --- Short circuiting is only performed for "static if", which also works for your test case. The string comparison used to be converted to a runtime call, so it could not be evaluated further

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #10 from Basile B. --- (In reply to Rainer Schuetze from comment #9) > > Sorry, did you miss my previous answer ? Use the code from the first > > message. > > The regression is obvious. > > I noticed and it is

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #9 from Rainer Schuetze --- > Sorry, did you miss my previous answer ? Use the code from the first message. > The regression is obvious. I noticed and it is consistent with what I tried to say before: the reduced

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #8 from Basile B. --- (In reply to Rainer Schuetze from comment #7) > > Rainer, not sure what you're saying. > > Is it invalid code in the test case, or a compiler problem? > > I'm not 100% sure. At runtime the code

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #7 from Rainer Schuetze --- > Rainer, not sure what you're saying. > Is it invalid code in the test case, or a compiler problem? I'm not 100% sure. At runtime the code will always produce a RangeError, but the check

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #6 from Basile B. --- I've failed when trying to reduce the issue. Take the first one as test case. ``` module test; class A23456{} string foo() { string result; mixin("alias m = " ~ __MODULE__ ~ ";");

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 Walter Bright changed: What|Removed |Added CC|

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #4 from Rainer Schuetze --- if you change the test to int test() { if (test.stringof.length < 7) return 0; return test.stringof[$-7..$] == "1234567"; } enum a = test(); it fails for older versions,

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 Rainer Schuetze changed: What|Removed |Added CC||r.sagita...@gmx.de

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-26 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 Mike Franklin changed: What|Removed |Added CC||slavo5...@yahoo.com

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #1 from Basile B. --- The '&&' RHS shouldn't be evaluated even in this simplified test case: ``` int test() { if (test.stringof.length >= 6 && test.stringof[$-7..$] == "1234567") {} return 0; } enum a

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 Basile B. changed: What|Removed |Added Keywords||CTFE --