blob: a0a6e2c41523d9a2f71bc5cbd3fde5a7bc72befc [file] [log] [blame]
module test12486;
struct S { enum a = 1; } // or `const` but not for all types
S f(ref int i)
{
++i;
return S();
}
void main()
{
int i = 2;
assert(f(i).a == 1);
// ensure that f(i) was actually called, even though
// a is a statically known property of the returned type
assert(i == 3);
}