https://issues.dlang.org/show_bug.cgi?id=18115
Basile-z changed:
What|Removed |Added
See Also||https://issues.dlang.org/sh
|
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
https://issues.dlang.org/show_bug.cgi?id=18115
Basile B. changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=18115
Basile B. changed:
What|Removed |Added
CC||turkey...@gmail.com
---
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
--
https://issues.dlang.org/show_bug.cgi?id=18115
Walter Bright changed:
What|Removed |Added
Keywords|CTFE|rejects-valid
---
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;
}
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
https://issues.dlang.org/show_bug.cgi?id=18115
Martin Nowak changed:
What|Removed |Added
CC||c...@dawg.eu
--- Comment #13
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 ?
--
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
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
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
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
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
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__ ~ ";");
https://issues.dlang.org/show_bug.cgi?id=18115
Walter Bright changed:
What|Removed |Added
CC|
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,
https://issues.dlang.org/show_bug.cgi?id=18115
Rainer Schuetze changed:
What|Removed |Added
CC||r.sagita...@gmx.de
https://issues.dlang.org/show_bug.cgi?id=18115
Mike Franklin changed:
What|Removed |Added
CC||slavo5...@yahoo.com
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
https://issues.dlang.org/show_bug.cgi?id=18115
Basile B. changed:
What|Removed |Added
Keywords||CTFE
--
22 matches
Mail list logo