https://issues.dlang.org/show_bug.cgi?id=13394
Issue ID: 13394 Summary: invariant fail to link since 2.066 when using separate compilation Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: regression Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: deadal...@gmail.com a.d : module a; import std.utf; class A { this() { } } class Btpl(T) : T { this()() { } invariant {} } alias B = Btpl!A; ------------- b.d : module b; import a; void main() { new B(); } ------------- $ dmd -c a.d && dmd -c b.d && dmd *.o Undefined symbols for architecture x86_64: "_D1a15__T4BtplTC1a1AZ4Btpl11__invariantMxFZv", referenced from: _D1a15__T4BtplTC1a1AZ4Btpl11__T6__ctorZ6__ctorMFZC1a15__T4BtplTC1a1AZ4Btpl in b.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status --- errorlevel 1 It has to be noted that importing std.utf seems to play a role here, which is weird. --