blob: e7316c317235301d1109ab7f1921288ba1c81bdc [file] [log] [blame]
/*
TEST_OUTPUT:
---
fail_compilation/bug8891.d(21): Error: need `this` for `opCall` of type `S(int n)`
---
*/
struct S
{
int value = 10;
S opCall(int n) // non-static
{
//printf("this.value = %d\n", this.value); // prints garbage!
S s;
s.value = n;
return s;
}
}
void main()
{
S s = 10;
}