mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
21 lines
408 B
D
21 lines
408 B
D
// REQUIRED_ARGS: -preview=dip1000
|
|
|
|
// Reduced from `std.systime`.
|
|
// Tuple expansion can trip up scope checking with errors like:
|
|
// Error: scope variable `__tup4` assigned to `found` with longer lifetime
|
|
|
|
struct Tuple(T...)
|
|
{
|
|
T t;
|
|
alias t this;
|
|
}
|
|
|
|
Tuple!(int*, int) find(return scope int* x) @safe
|
|
{
|
|
assert(0);
|
|
}
|
|
|
|
void fromISOExtString(scope int* str) @safe
|
|
{
|
|
int* found = str.find()[0];
|
|
}
|