D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20738 - Linker error when calling map, zip, and dirEntries
Summary: Linker error when calling map, zip, and dirEntries
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 critical
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-15 06:09 UTC by Andrej Mitrovic
Modified: 2023-08-06 13:43 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 Andrej Mitrovic 2020-04-15 06:09:06 UTC
-----
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.
Comment 1 RazvanN 2022-07-14 12:11:02 UTC
I cannot reproduce this with the latest version of master. Seems to have been fixed.