[Issue 3092] Indexing a tuple produces a tuple containing the indexed element

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 11 08:18:24 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3092



--- Comment #8 from Manuel König <manuelk89 at gmx.net> 2010-10-11 08:17:55 PDT ---
I have now fixed the bug, it's a trivial 7 line patch which teaches
TypeSArray::resolve(...) to recognize if it's indexing a type element. Without
the patch, TypeSArray::resolve(...) will create a 1-element-slice when indexing
a type in a tuple. This fixes the bug described in this issue.

This patch does not fix the pragma(msg, "values:    ", values); bugs, which is
caused by another bug I described in a previous comment. That one would also be
easy to fix, it's only a formatting bug, I'm just not sure how a proper patch
for that would look like.

I also tested dmd rev 714 (that one in branch dmd1.x) and my patched version of
it in dstress. No improvements, regressions or changes were introduced. I then
created a testcase that can be added to the dstress/compile/t directory, which
passes with my patch applied, but fails in dmd rev 714.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list