(root)/
gcc-13.2.0/
gcc/
testsuite/
gdc.test/
fail_compilation/
fail2450.d
// https://issues.dlang.org/show_bug.cgi?id=2450
/*
TEST_OUTPUT:
---
fail_compilation/fail2450.d(22): Error: function expected before `()`, not `this.mixin Event!() clicked;
` of type `void`
fail_compilation/fail2450.d(25): Error: function expected before `()`, not `b.mixin Event!() clicked;
` of type `void`
---
*/

template Event()
{
	void opCall() { }
	void opAddAssign(int i) { }
}
class Button {
	mixin Event clicked;
	void func()
    {
		clicked.opCall(); // works
		this.clicked();   // works

		auto b = new Button();
		b.clicked();      // works
	}
}