On 02/12/2012 11:51 AM, Walter Bright wrote:
http://ftp.digitalmars.com/dmd2beta.zip
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

The attached file compiles with dmd 2.057 but fails with the beta.
module test;

class Base
{
	override bool opEquals(Object obj)
	{
		return true;
	}

	T opCast(T : Base)()
	{
		return null;
	}
}

class Derived : Base
{

}

void main()
{
	//Error: template instance opCast!(Object) opCast!(Object)
	//       does not match template declaration opCast(T : Base).
	assert(new Derived() == new Base());
}
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to