D.gnu - [Bug 300] New: Undefined reference to
- gdc-bugzilla gdcproject.org (45/45) Jul 21 2018 https://bugzilla.gdcproject.org/show_bug.cgi?id=300
https://bugzilla.gdcproject.org/show_bug.cgi?id=300 Bug ID: 300 Summary: Undefined reference to random.Sample!(Test).Sample.test(ulong) Product: GDC Version: development Hardware: All OS: All Status: NEW Severity: normal Priority: Normal Component: gdc Assignee: ibuclaw gdcproject.org Reporter: ibuclaw gdcproject.org As pow() is now a CTFE-able built-in, its backend symbol is generated - calling `needsCodegen` - before its context has completed full semantic analysis. This means that all members of `struct Sample` are erroneously marked as not needed, resulting in a linker error. --- module random; struct Sample(Range) { double test(size_t remaining) { double r ; return r ^^ remaining; } } auto sample(Range)(Range) { return Sample!(Range)(); } void main() { struct Test { } static assert(is( typeof(sample(Test())) == struct )); auto sample = sample(Test()); sample.test(5); } --- -- You are receiving this mail because: You are watching all bug changes.
Jul 21 2018