-
-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14280 from ibuclaw/merge_stable
merge stable
- Loading branch information
Showing
36 changed files
with
414 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v2.100.0 | ||
v2.100.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
`scope(failure)` blocks that contain `return` statements are now deprecated | ||
|
||
Starting with this release, having a `return` statement in the body of a `scope(failure)` | ||
statement is deprecated. Having the ability to `return` from such blocks is error prone since currently, Errors are also handled by `scope(failure)`. This leads to the following situation: | ||
|
||
--- | ||
ulong get () @safe nothrow | ||
{ | ||
scope (failure) return 10; | ||
throw new Error(""); | ||
} | ||
|
||
void main () @safe | ||
{ | ||
assert(get() == 10); // passes | ||
} | ||
--- | ||
|
||
where an error is circumvented by a return. If a return is indeed desired | ||
in such situations, then the solution is to simply use a try-catch block | ||
for the function body. | ||
|
||
Note: `scope(exit)` and `scope(success)` already present this restriction. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// REQUIRED_ARGS: -O -inline | ||
|
||
//https://issues.dlang.org/show_bug.cgi?id=20143 | ||
real fun(int x) { return 0.0; } | ||
|
||
double bug() | ||
{ | ||
// value passed to fun is irrelevant | ||
return 0.0 / fun(420); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// https://issues.dlang.org/show_bug.cgi?id=23082 | ||
|
||
/* | ||
TEST_OUTPUT: | ||
--- | ||
bar | ||
--- | ||
*/ | ||
|
||
void foo()() {} | ||
alias bar = foo; | ||
void bar() { } | ||
|
||
void main() | ||
{ | ||
pragma(msg, __traits(parent, main).bar.stringof); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// REQUIRED_ARGS: -inline | ||
|
||
// https://issues.dlang.org/show_bug.cgi?id=23166 | ||
|
||
// seg fault with -inline | ||
|
||
bool __equals(scope const char[] lhs, scope const char[] rhs) | ||
{ | ||
if (lhs.length != rhs.length) | ||
return false; | ||
|
||
{ | ||
import core.stdc.string : memcmp; | ||
return lhs.length == 0; | ||
} | ||
return true; | ||
} | ||
|
||
int test(string type) | ||
{ | ||
return __equals(type, "as-is"); | ||
} |
Oops, something went wrong.