August 10, 2018 [Issue 19154] New: Undefined reference to inline function in mixin template | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19154 Issue ID: 19154 Summary: Undefined reference to inline function in mixin template Product: D Version: D2 Hardware: x86_64 URL: https://forum.dlang.org/post/eaaquwgqoapxuaxkdvfg@foru m.dlang.org OS: Linux Status: NEW Keywords: link-failure Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: dfj1esp02@sneakemail.com mixin template test() { pragma(inline, true) // remove this will work static int zzz() { return 0; } int dummy = zzz(); } void f() { mixin test!(); } Trying to link this code gives error: undefined reference to '_D9onlineapp1fFZ8__mixin13zzzFNbNiZi' collect2: error: ld returned 1 exit status Error: linker exited with status 1 -- |
Copyright © 1999-2021 by the D Language Foundation