https://issues.dlang.org/show_bug.cgi?id=14074
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |link-failure CC| |[email protected] --- Comment #1 from [email protected] --- This is introduced by pull: https://github.com/D-Programming-Language/dmd/pull/3948 I reduced into small source files: //////// cbor.d void encodeCbor(R, E)(R sink, E value) { encodeCborInt(sink); encodeCborArray(sink, value); static assert(false); } void encodeLongType(R)(R sink) { import primitives; put(sink); } void encodeCborInt(R)(R sink) { encodeLongType(sink); } void encodeCborArrayHead(R)(R sink, ulong arrayLength) { encodeLongType(sink); } void encodeCborArray(R, A)(R sink, A) { encodeCborArrayHead(sink, __traits(compiles, { encodeCbor(cast(ubyte[])null, A.tupleof[0].init); })); } //////// primitives.d void put(R)(R) { } //////// test.d import primitives; // necessary import cbor; struct Inner { } struct Test { Inner inner; } void main () { ubyte[] buffer; Test test ; encodeCborArray(buffer, test); } $ ls cbor.d primitives.d test.d $ dmd test.d cbor.d test.o: In function `pure nothrow @nogc @safe void cbor.encodeLongType!(ubyte[]).encodeLongType(ubyte[])': cbor.d:(.text.pure nothrow @nogc @safe void cbor.encodeLongType!(ubyte[]).encodeLongType(ubyte[])+0x1c): undefined reference to `pure nothrow @nogc @safe void primitives.put!(ubyte[]).put(ubyte[])' collect2: error: ld returned 1 exit status --- errorlevel 1 $ dmd -allinst test.d cbor.d && echo OK OK $ dmd -c cbor.d $ dmd test.d cbor.o && echo OK OK --
