D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4796 - std.array.appender changes broke dmd unit test runnable/untag.d
Summary: std.array.appender changes broke dmd unit test runnable/untag.d
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: tools (show other issues)
Version: D2
Hardware: Other Windows
: P2 regression
Assignee: Thomas Kühne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-03 03:04 UTC by Brad Roberts
Modified: 2015-06-09 01:36 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Brad Roberts 2010-09-03 03:04:22 UTC
To reproduce, from the dmd test dir:

make test_results/runnable/untag.d.out

The errors:
runnable/untag.d(105): Error: template std.array.appender(A : E[],E) does not match any function template declaration
runnable/untag.d(105): Error: template std.array.appender(A : E[],E) cannot deduce template function from argument types !()(string*)
Comment 1 Don 2010-09-03 04:00:31 UTC
It's because appender() no longer takes a pointer.
Comment 2 Steven Schveighoffer 2010-09-03 08:13:42 UTC
Don is correct, I changed the interface of appender to be safer (not use pointers to most likely stack variables).  Changing bug component to dmd, since this is a dmd test issue, not a phobos issue.

Here is a patch.  I tried to test it but I get the ominous "no object.d error"  I have no patience to try and understand what your test harnesses are doing, so I'll let you figure out if this works or not:

Index: runnable/untag.d
===================================================================
--- runnable/untag.d	(revision 657)
+++ runnable/untag.d	(working copy)
@@ -101,9 +101,9 @@
                         "Could not find closing tag: "~txt);
             }
         } else {
-            string code;
-            findConsume(txt, ';', appender(&code));
-            switch (code) {
+            auto app = appender!string();
+            findConsume(txt, ';', app);
+            switch (app.data) {
             case "#160;": case "#32;": case "reg;": case "nbsp;":
                 writeChar(' ');
                 break;
@@ -120,7 +120,7 @@
                 writeChar('"');
                 break;
             default:
-                throw new Exception(text("Unknown code: &", code));
+                throw new Exception(text("Unknown code: &", app.data));
                 break;
             }
         }
Comment 3 Don 2010-09-03 11:40:54 UTC
(In reply to comment #2)
> Changing bug component to dmd, since this is a dmd test issue, not a phobos issue.

It's not a dmd bug. Might as well use the dstress component for this! (Can we rename that tag?)
Comment 4 Brad Roberts 2010-09-03 22:22:44 UTC
Fix committed in dmd r658.

Quibbling about which component it should be assigned to is really petty.  Change in phobos caused the dmd test suite to fail.  That's what was important.