Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/stable' into merge_stable
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Apr 1, 2024
2 parents 0b677d9 + b657678 commit f2b61e6
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 145 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.108.0-rc.1
v2.108.0
10 changes: 0 additions & 10 deletions changelog/dmd.classinfo.dd

This file was deleted.

44 changes: 0 additions & 44 deletions changelog/dmd.default-init.dd

This file was deleted.

29 changes: 0 additions & 29 deletions changelog/dmd.hexstring-cast.dd

This file was deleted.

18 changes: 0 additions & 18 deletions changelog/dmd.ies.dd

This file was deleted.

41 changes: 0 additions & 41 deletions changelog/dmd.named-arguments.dd

This file was deleted.

14 changes: 12 additions & 2 deletions druntime/src/core/internal/array/duplication.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ U[] _dup(T, U)(scope T[] a) pure nothrow @trusted if (__traits(isPOD, T))
{
import core.stdc.string : memcpy;
import core.internal.array.construction: _d_newarrayUPureNothrow;
auto arr = _d_newarrayUPureNothrow!T(a.length, is(T == shared));
auto arr = _d_newarrayUPureNothrow!U(a.length, is(U == shared));
memcpy(cast(void*) arr.ptr, cast(const(void)*) a.ptr, T.sizeof * a.length);
return *cast(U[]*) &arr;
return arr;
}
}

Expand Down Expand Up @@ -358,3 +358,13 @@ U[] _dup(T, U)(T[] a) if (!__traits(isPOD, T))
static assert(test!Copy());
assert(test!Copy());
}

// https://issues.dlang.org/show_bug.cgi?id=24453
@safe unittest
{
static inout(char)[] foo(ref scope return inout(char)[] s)
{
auto bla = s.idup;
return s;
}
}

0 comments on commit f2b61e6

Please sign in to comment.