Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
December 26, 2004 BUG: Assertion failure | ||||
---|---|---|---|---|
| ||||
This code contains an error, operator !== should be used instead of != in the findNode() function (problem doesn't show up then) Yet dmd.109 reports something else ;) > Assertion failure: 'ident' on line 611 in file 'dsymbol.c' interface INode { INode owner(); } class BasicNode : INode { INode findNode() { foreach(INode c; m_children) if (c.owner != this) continue; return null; } INode[] m_children; } The result is exactly the same if the owner() function is implemented in the BasicNode class. |
December 26, 2004 Re: Assertion failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to h3r3tic Attachments: | Added to DStress as http://dstress.kuehne.cn/nocompile/bug_dsymbol_611_A.d http://dstress.kuehne.cn/nocompile/bug_dsymbol_611_B.d http://dstress.kuehne.cn/compile/bug_dsymbol_611_C.d Thomas |
December 28, 2004 Re: BUG: Assertion failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to h3r3tic | On Sun, 26 Dec 2004 16:24:08 +0100, h3r3tic <foo@bar.baz> wrote:
> This code contains an error, operator !== should be used instead of !=
> in the findNode() function (problem doesn't show up then)
> Yet dmd.109 reports something else ;)
>
> > Assertion failure: 'ident' on line 611 in file 'dsymbol.c'
>
>
> interface INode
> {
> INode owner();
> }
>
>
> class BasicNode : INode
> {
> INode findNode()
> {
> foreach(INode c; m_children)
> if (c.owner != this) continue;
> return null;
> }
>
> INode[] m_children;
> }
>
> The result is exactly the same if the owner() function is implemented in
> the BasicNode class.
>
I was under the impression that the identifier token === (and its negative !==)
were replaced by 'is' (and !(foo is bar))
|
December 28, 2004 OT: Re: BUG: Assertion failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simon Buchan | Simon Buchan wrote:
> On Sun, 26 Dec 2004 16:24:08 +0100, h3r3tic <foo@bar.baz> wrote:
>
>> This code contains an error, operator !== should be used instead of !=
>> in the findNode() function (problem doesn't show up then)
>> Yet dmd.109 reports something else ;)
>>
>> > Assertion failure: 'ident' on line 611 in file 'dsymbol.c'
>>
>>
>> interface INode
>> {
>> INode owner();
>> }
>>
>>
>> class BasicNode : INode
>> {
>> INode findNode()
>> {
>> foreach(INode c; m_children)
>> if (c.owner != this) continue;
>> return null;
>> }
>> INode[] m_children;
>> }
>>
>> The result is exactly the same if the owner() function is implemented in
>> the BasicNode class.
>>
>
> I was under the impression that the identifier token === (and its negative !==)
> were replaced by 'is' (and !(foo is bar))
Not replaced. They're alternatives. Anyway it was not a typo in the code so the '=' versus '==' versus '===' problem doesn't apply here ;)
Anyways, why hasn't the 'a aint b' operator been adopted instead of '!(a is b)' ? Maybe I should add it to my preprocessor :)
|
December 28, 2004 Re: OT: Re: BUG: Assertion failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to h3r3tic | h3r3tic wrote:
> Anyways, why hasn't the 'a aint b' operator been adopted instead of '!(a is b)' ? Maybe I should add it to my preprocessor :)
Shouldn't that be "isnt" ? (since "isn't" is a keyword nightmare)
I'm not really sure that D needs any more english operators, though...
(and there are plenty before that one: "unless", "and", "or", "not")
--anders
|
Copyright © 1999-2021 by the D Language Foundation