Identifier / IndexedIdentifier of anonymous structs !isEmpty() but .toString().isEmpty()

David Nolden zwabel at googlemail.com
Sat Jul 24 20:41:17 UTC 2010


This is no bug. Anonymous structs have an additional integer stored in their
identifier as identity (called something with "unique").

Am 24.07.2010 19:58 schrieb "Milian Wolff" <mail at milianw.de>:

Hey there,

just encountered a strange bug: The identifier/indexedIdentifier for
anonymous
structs return false on .isEmpty(), but .toString().isEmpty() returns
true...

but this works as expected:


 Identifier nullIdentifier;
 qDebug() << nullIdentifier.isEmpty() <<
IndexedIdentifier(nullIdentifier).isEmpty();
 Identifier emptyIdentifier("");
 qDebug() << emptyIdentifier.isEmpty() <<
IndexedIdentifier(emptyIdentifier).isEmpty();

all true...

Should I add a Q_EXPECT_FAIL unit test for the former? Imo this should not
occur.

Anyhow, I'll now filter the anon structs during code completion somehow
differently...
--
Milian Wolff
mail at milianw.de
http://milianw.de

--
KDevelop-devel mailing list
KDevelop-devel at kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100724/b3bc874e/attachment.html>


More information about the KDevelop-devel mailing list