Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merge upstream stable #4615

Merged
merged 5 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# LDC master

#### Big news
- Frontend, druntime and Phobos are at version [2.108.0](https://dlang.org/changelog/2.108.0.html). (#4591)
- Frontend, druntime and Phobos are at version [2.108.0](https://dlang.org/changelog/2.108.0.html). (#4591, #4615)
- Preliminary support for LLVM 18. (#4599, #4605, #4607)

#### Platform support
- Supports LLVM 11 - 18.

#### Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion packaging/dlang-tools_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.107.1
v2.108.0
2 changes: 1 addition & 1 deletion packaging/dub_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.36.0
v1.37.0
14 changes: 12 additions & 2 deletions runtime/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;
}
}
Loading