opDispatch bug?

Zhenya zheny at list.ru
Sat Dec 15 10:01:37 PST 2012


Hi!
Is it a bug?

class Foo
{
	int m_bar;
	char m_gun;
	@property auto ref opDispatch(string s)()
	{
		return mixin("m_"~s);	
	}
	this(int i,char c)
	{
		bar = i;//Error: undefined identifier bar, did you mean 
variable m_bar?
		this.gun = c;
	}
}


More information about the Digitalmars-d-learn mailing list