www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17155] New: [REG2.071.0]

https://issues.dlang.org/show_bug.cgi?id=17155

          Issue ID: 17155
           Summary: [REG2.071.0]
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: link-failure
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

//////////////////// test.d ///////////////////
import std.algorithm;
import std.file;

void main()
{
    string[] files;
    files.map!(mask =>
        dirEntries(".", mask, SpanMode.shallow)
        .map!(de => de)
    );
}
///////////////////////////////////////////////

Works with 2.070.2.

With 2.071.0, doesn't link:

test.o: In function
`_D3std9algorithm9iteration239__T9MapResultS584test4mainFZ18__T9__lambda1TAyaZ9__lambda1MFAyaZ9__lambda2TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ9MapResult9__xtoHashFNbNeKxS3std9algorithm9iteration239__T9MapResultS584test4mainFZ18__T9__lambda1TAyaZ9__lambda1MFAyaZ9__lambda2TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ9MapResultZm':
test.d:(.text._D3std9algorithm9iteration239__T9MapResultS584test4mainFZ18__T9__lambda1TAyaZ9__lambda1MFAyaZ9__lambda2TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ9MapResult9__xtoHashFNbNeKxS3std9algorithm9iteration239__T9MapResultS584test4mainFZ18__T9__lambda1TAyaZ9__lambda1MFAyaZ9__lambda2TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ9MapResultZm+0x18):
undefined reference to
`_D173TypeInfo_xS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResult6__initZ'
test.d:(.text._D3std9algorithm9iteration239__T9MapResultS584test4mainFZ18__T9__lambda1TAyaZ9__lambda1MFAyaZ9__lambda2TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ9MapResult9__xtoHashFNbNeKxS3std9algorithm9iteration239__T9MapResultS584test4mainFZ18__T9__lambda1TAyaZ9__lambda1MFAyaZ9__lambda2TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ9MapResultZm+0x1f):
undefined reference to
`_D173TypeInfo_xS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResult6__initZ'
collect2: error: ld returned 1 exit status
--- errorlevel 1

Introduced in https://github.com/D-Programming-Language/phobos/pull/3969 , but
that seems to merely expose a latent dmd bug.

Using -allinst doesn't help.

--
Feb 07 2017