blob: 4fd3af4347b3455af781caed61b6b5bc627a2953 [file] [log] [blame]
/******************************************/
struct Foo
{
int v;
int bar(int value) { return v = value + 2; }
int bar() { return 73; }
}
int test1()
{
Foo f;
int i;
i = (f.bar = 6);
assert(i == 8);
assert(f.v == 8);
i = f.bar;
assert(i == 73);
return 0;
}
/******************************************/
// 6259
struct S6259
{
private int m_prop;
ref const(int) prop() { return m_prop; }
void prop(int v) { m_prop = v; }
}
void test6259()
{
S6259 s;
s.prop = 1;
}
/******************************************/
void main()
{
test1();
test6259();
}