[dmd-beta] D2 2.058 beta 3

Mike Wey mike at mikewey.eu
Sun Feb 12 11:40:54 PST 2012


On 02/12/2012 08:21 PM, Walter Bright wrote:
>
>
> On 2/12/2012 5:59 AM, Mike Wey wrote:
>> On 02/12/2012 02:50 PM, Mike Wey wrote:
>>> On 02/12/2012 11:51 AM, Walter Bright wrote:
>>>> http://ftp.digitalmars.com/dmd2beta.zip
>>>> _______________________________________________
>>>> dmd-beta mailing list
>>>> dmd-beta at puremagic.com
>>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>
>>> The attached file compiles with dmd 2.057 but fails with the beta.
>>
>> Reduced the test case a little more.
>
> What's happening is Object.opEquals(Object) needs to be called to do 
> the comparison, meaning that Base must be converted to an Object. But 
> the example only allows converting to a Base, hence it cannot call 
> Object.opEquals(Object), hence the error message.
>
> I think the code example is invalid.
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
But Base already is an Object, so why is it trying to call the opCast?

The unittest in my code that causes the error with the beta runs as 
expected when compiled with dmd 2.057.


More information about the dmd-beta mailing list