D1: Error: function ... cannot have an in contract when overriden function

jicman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 7 17:37:45 PST 2014


Greetings!

I am trying to compile dfl with the latest version of D1.  I am 
stuck in this error:

c:\D\import\dfl\button.d(381): Error: function 
dfl.button.Button.text cannot have
e an in contract when overriden function dfl.control.Control.text 
does not have an in contract

This is the line 381:

override void text(Dstring txt) // setter
in
{
	if(txt.length)
		assert(!this.image, "Button image with text not supported");
}
body
{
	super.text = txt;
}

alias Control.text text; // Overload.

Any help would be greatly appreciated.  Thanks.



More information about the Digitalmars-d-learn mailing list