mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
17 lines
359 B
D
17 lines
359 B
D
// REQUIRED_ARGS: -checkaction=context -preview=dip1000
|
|
|
|
// Issue 22919 - [dip1000] -checkaction=context gives "assigned to `__assertOp2` with longer lifetime" (
|
|
// https://issues.dlang.org/show_bug.cgi?id=22919
|
|
|
|
@safe:
|
|
struct S
|
|
{
|
|
int* p;
|
|
ref S get() scope return {return this;}
|
|
}
|
|
|
|
void main()
|
|
{
|
|
scope S arr = S();
|
|
assert(arr == arr.get());
|
|
}
|