February 05, 2005
I came across this a fairly minor dmd bug (0.112), dmd outputs the correct error message then an assertion failure and abnormal termination.

class MyClass
{
}

MyClass[char[]] myarray;

void fn()
{
	foreach (MyClass mc; myarray) return mc;
}


results in:
test10.d(9): cannot implicitly convert expression mc of type MyClass to void
Assertion failure: 'fdx->vresult' on line 1450 in file 'statement.c'

abnormal program termination
February 05, 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Russell Wilkins schrieb am Sat, 05 Feb 2005 07:47:41 +0000:
> I came across this a fairly minor dmd bug (0.112), dmd outputs the correct error message then an assertion failure and abnormal termination.
>
> class MyClass
> {
> }
>
> MyClass[char[]] myarray;
>
> void fn()
> {
> 	foreach (MyClass mc; myarray) return mc;
> }
>
>
> results in:
> test10.d(9): cannot implicitly convert expression mc of type MyClass to void
> Assertion failure: 'fdx->vresult' on line 1450 in file 'statement.c'
>
> abnormal program termination

Added to DStress as http://dstress.kuehne.cn/nocompile/cast_19.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCBUro3w+/yD4P9tIRAjRkAJ9rnTicniUAoTLlLCb6sdYN98PyzwCgk3xr
i8/vHX0/LfvOcFEFyoSv3uM=
=g4Zi
-----END PGP SIGNATURE-----