diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-07-26 18:13:54 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-07-26 23:43:13 +0200 |
commit | 81a0fa31ce96327618023b476ea121dbe2494b04 (patch) | |
tree | 7a92b40bb7124e7e2449fef9983e22db836a0f65 /libphobos/src | |
parent | 2009850b2b7042a678c385cd72e6ceb40caac8cd (diff) |
d: Merge upstream dmd 76e3b41375, druntime 1462ebd1, phobos 5fef0d28f.
Updates D language version to v2.100.1.
D front-end changes:
- Fix delegate literal with inferred return value that requires
following alias-this to not use class cast.
- Fix internal error on variadic template type instantiated with two
arrays of classes.
- `scope(failure)' blocks that contain `return' statements are now
deprecated.
- Fix regression where wrong cast was inserted for ternary operator
and non-int enums.
- Fix internal error in code generation trying to reference
_d_arraysetctor.
- Fix memory corruption when array literal is passed to map in
lambda, then returned from nested function.
- Generate invariant id on the basis of location rather than a
global counter.
- Make `noreturn' conversions work.
- Fix segfault when `.stringof' of template alias overloaded with
function accessed by trait.
- Empty array literal passed to scope param not 'falsey' anymore.
Phobos changes:
- Avoid copying ranges in std.algorithm.comparison.equal.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 76e3b41375.
* dmd/VERSION: Bump version to v2.100.1.
* decl.cc (DeclVisitor::visit (VarDeclaration *)): Evaluate RHS
of noreturn declaration expressions first.
* expr.cc (ExprVisitor::visit (AssignExp *)): Don't generate
assignment for noreturn types.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime 1462ebd1.
* src/MERGE: Merge upstream phobos 5fef0d28f.
Diffstat (limited to 'libphobos/src')
-rw-r--r-- | libphobos/src/MERGE | 2 | ||||
-rw-r--r-- | libphobos/src/std/algorithm/comparison.d | 2 | ||||
-rw-r--r-- | libphobos/src/std/typecons.d | 10 |
3 files changed, 10 insertions, 4 deletions
diff --git a/libphobos/src/MERGE b/libphobos/src/MERGE index ed9a02e1a0c..f2678185f39 100644 --- a/libphobos/src/MERGE +++ b/libphobos/src/MERGE @@ -1,4 +1,4 @@ -604534d7cb29d49a6474f0aaaa5d166057a44f72 +5fef0d28fc873fb5a0dbfb9149759d76a7b9f1b7 The first line of this file holds the git revision number of the last merge done from the dlang/phobos repository. diff --git a/libphobos/src/std/algorithm/comparison.d b/libphobos/src/std/algorithm/comparison.d index 2fcc2bacd5c..b810fbb9258 100644 --- a/libphobos/src/std/algorithm/comparison.d +++ b/libphobos/src/std/algorithm/comparison.d @@ -1027,7 +1027,7 @@ template equal(alias pred = "a == b") } } - private bool equalLoop(Rs...)(Rs rs) + private bool equalLoop(Rs...)(ref Rs rs) { for (; !rs[0].empty; rs[0].popFront) static foreach (r; rs[1 .. $]) diff --git a/libphobos/src/std/typecons.d b/libphobos/src/std/typecons.d index 1ee7faaee7b..fb15001233a 100644 --- a/libphobos/src/std/typecons.d +++ b/libphobos/src/std/typecons.d @@ -4905,8 +4905,14 @@ if (is(Interface == interface) && is(BaseClass == class)) // - try default first // - only on a failure run & return fallback enum fallback = q{ - scope (failure) return fallback.%1$s(args); - return default_.%1$s(args); + try + { + return default_.%1$s(args); + } + catch (Exception) + { + return fallback.%1$s(args); + } }.format(__traits(identifier, func)); } |