www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20738] New: Linker error when calling map, zip, and dirEntries

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

          Issue ID: 20738
           Summary: Linker error when calling map, zip, and dirEntries
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: andrej.mitrovich gmail.com

-----
import std.algorithm;
import std.file;
import std.range;

void main ()
{
    auto x = ["a", "b"]
        .map!(path =>
            .zip(dirEntries(path, ".*", SpanMode.shallow),
                 dirEntries(path, ".*", SpanMode.shallow)));
}
-----

$ dmd test.d

-----
/tmp/.rdmd-1000/rdmd-test.d-C72EA7140D79CE87EECBAB65FCCCAE28/objs/test.o: In
function
`_D3std5range__T11ZipShortestVEQBc8typecons__T4FlagVAyaa18_616c6c4b6e6f776e53616d654c656e677468ZQByi0TSQDw9algorithm9iteration__T12FilterResultS_DQFn4file10dirEntriesFQElQEoEQGpQBc8SpanModebZ1fMFNaNbNfSQHrQCe8DirEntryZbTSQIkQCx11DirIteratorZQEiTQFnZQIz9__xtoHashFNbNeKxSQKhQKg__TQKdVQJti0TQHfTQHjZQKvZm':
test.d:(.text._D3std5range__T11ZipShortestVEQBc8typecons__T4FlagVAyaa18_616c6c4b6e6f776e53616d654c656e677468ZQByi0TSQDw9algorithm9iteration__T12FilterResultS_DQFn4file10dirEntriesFQElQEoEQGpQBc8SpanModebZ1fMFNaNbNfSQHrQCe8DirEntryZbTSQIkQCx11DirIteratorZQEiTQFnZQIz9__xtoHashFNbNeKxSQKhQKg__TQKdVQJti0TQHfTQHjZQKvZm[_D3std5range__T11ZipShortestVEQBc8typecons__T4FlagVAyaa18_616c6c4b6e6f776e53616d654c656e677468ZQByi0TSQDw9algorithm9iteration__T12FilterResultS_DQFn4file10dirEntriesFQElQEoEQGpQBc8SpanModebZ1fMFNaNbNfSQHrQCe8DirEntryZbTSQIkQCx11DirIteratorZQEiTQFnZQIz9__xtoHashFNbNeKxSQKhQKg__TQKdVQJti0TQHfTQHjZQKvZm]+0x1c):
undefined reference to
`_D152TypeInfo_xS3std9algorithm9iteration__T12FilterResultS_DQBs4file10dirEntriesFAyaQdEQCtQBb8SpanModebZ1fMFNaNbNfSQDvQCd8DirEntryZbTSQEoQCw11DirIteratorZQEh6__initZ'
test.d:(.text._D3std5range__T11ZipShortestVEQBc8typecons__T4FlagVAyaa18_616c6c4b6e6f776e53616d654c656e677468ZQByi0TSQDw9algorithm9iteration__T12FilterResultS_DQFn4file10dirEntriesFQElQEoEQGpQBc8SpanModebZ1fMFNaNbNfSQHrQCe8DirEntryZbTSQIkQCx11DirIteratorZQEiTQFnZQIz9__xtoHashFNbNeKxSQKhQKg__TQKdVQJti0TQHfTQHjZQKvZm[_D3std5range__T11ZipShortestVEQBc8typecons__T4FlagVAyaa18_616c6c4b6e6f776e53616d654c656e677468ZQByi0TSQDw9algorithm9iteration__T12FilterResultS_DQFn4file10dirEntriesFQElQEoEQGpQBc8SpanModebZ1fMFNaNbNfSQHrQCe8DirEntryZbTSQIkQCx11DirIteratorZQEiTQFnZQIz9__xtoHashFNbNeKxSQKhQKg__TQKdVQJti0TQHfTQHjZQKvZm]+0x41):
undefined reference to
`_D152TypeInfo_xS3std9algorithm9iteration__T12FilterResultS_DQBs4file10dirEntriesFAyaQdEQCtQBb8SpanModebZ1fMFNaNbNfSQDvQCd8DirEntryZbTSQEoQCw11DirIteratorZQEh6__initZ'
------

Tested with 2.090 and 2.091.

--
Apr 14