dmd/compiler/test/runnable/test7932.d
2022-07-09 18:53:07 +02:00

30 lines
493 B
D

// https://issues.dlang.org/show_bug.cgi?id=7932
import core.stdc.stdio;
size_t N;
class C
{
protected void f(size_t n)
out
{
printf("out: this=%p &n=%p n=%zu\n",
cast(void*) this, &n, n);
assert (N == n);
}
do
{
int dummy;
//printf("\n");
N = n;
printf("body: this=%p &dummy=%p &N=%p N=%zu\n",
cast(void*) this, &dummy, &N, N);
}
}
void main()
{
auto x = new C;
x.f(1);
}