-
-
Notifications
You must be signed in to change notification settings - Fork 658
Open
Labels
Description
Simon Naarmann (@SimonN) reported this on 2015-12-17T02:58:39Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=15459
CC List
- ag0aep6g
- Walter Bright (@WalterBright)
- FeepingCreature (@FeepingCreature)
- Vladimir Panteleev (@CyberShadow)
- John Colvin
- ZombineDev
- Siarhei Siamashka
Description
http://dpaste.dzfl.pl/ce501c212d32
This code calls byLine, each, map!somefunc. It compiles fine, but fails to link. Tested on my Linux machine with DMD 2.069.2 and on dpaste with DMD 2.069.1.
Expected: Either an error during compilation, or a well-linked executable.
Code copied here for convenience:
#!/usr/bin/rdmd
import std.stdio;
import std.algorithm;
char somefunc(in char c)
{
return c;
}
void main()
{
stdin
.byLine
.each!(map!somefunc);
}dmd outputs:
/d773/f942.o: In function `_D3std9algorithm9iteration32__T3mapS21_D4f9428somefuncFxaZaZ11__T3mapTAaZ3mapFNaNbNiNfAaZS3std9algorithm9iteration41__T9MapResultS21_D4f9428somefuncFxaZaTAaZ9MapResult': /d773/f942.d:
(.text._D3std9algorithm9iteration32__T3mapS21_D4f9428somefuncFxaZaZ11__T3mapTAaZ3mapFNaNbNiNfAaZS3std9algorithm9iteration41__T9MapResultS21_D4f9428somefuncFxaZaTAaZ9MapResult+0x30):
undefined reference to
`_D3std9algorithm9iteration41__T9MapResultS21_D4f9428somefuncFxaZaTAaZ9MapResult6__ctorMFNaNbNcNiNfAaZS3std9algorithm9iteration41__T9MapResultS21_D4f9428somefuncFxaZaTAaZ9MapResult'
collect2: error: ld returned 1 exit status
--- errorlevel 1