[Issue 19375] New: .init of a nested struct stumps the inliner
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 7 20:20:36 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19375
Issue ID: 19375
Summary: .init of a nested struct stumps the inliner
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: stanislav.blinov at gmail.com
union Erase(T) { T typed; }
void func(T)() {
pragma(inline, true);
auto e = Erase!T(T.init);
}
void main() {
version (TestNested) {
struct S { ~this() {} /* so that it's nested */ }
} else {
static struct S { ~this() {} }
}
func!S;
}
$ dmd -inline test.d
Compiles
$ dmd -inline -version=TestNested test.d
test.d(3): Error: function `test.func!(S).func` cannot inline function
--
More information about the Digitalmars-d-bugs
mailing list