digitalmars.D.bugs - BUG: Assertion failure
- h3r3tic (20/21) Dec 26 2004 This code contains an error, operator !== should be used instead of !=
- Thomas Kuehne (12/12) Dec 26 2004 -----BEGIN PGP SIGNED MESSAGE-----
- Simon Buchan (3/24) Dec 28 2004 I was under the impression that the identifier token === (and its negati...
- h3r3tic (5/39) Dec 28 2004 Not replaced. They're alternatives. Anyway it was not a typo in the code...
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (5/7) Dec 28 2004 Shouldn't that be "isnt" ? (since "isn't" is a keyword nightmare)
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.
Dec 26 2004
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 -----BEGIN PGP SIGNATURE----- iD8DBQFBzyyD3w+/yD4P9tIRArJIAJ4l5IMXQbKhOR7eYrpDK199E/6JjQCfbw8L C2pgWuPJStEt9MyWk1Jd4JU= =EaSw -----END PGP SIGNATURE-----
Dec 26 2004
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))
Dec 28 2004
Simon Buchan wrote:On Sun, 26 Dec 2004 16:24:08 +0100, h3r3tic <foo bar.baz> wrote: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 :)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))
Dec 28 2004
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
Dec 28 2004