Bug 20420 – [REG2.067] inlining error with a valid function
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-11-27T04:11:43Z
Last change time
2019-11-29T03:13:18Z
Keywords
pull
Assigned to
No Owner
Creator
Suleyman Sahmi (سليمان السهمي)
Comments
Comment #0 by sahmi.soulaimane — 2019-11-27T04:11:43Z
Test case:
```
struct S { ~this(); }
class C
{
this(S, int) {}
}
int i();
C create()
{
return new C(S(), i());
}
auto test()
{
auto c = create();
}
```
When compiled with `-inline` it fails, otherwise it works normally.
Comment #1 by dlang-bot — 2019-11-28T14:58:59Z
@SSoulaimane created dlang/dmd pull request #10627 "Fix issue 20420 - some expressions are missed during by the inliner" fixing this issue:
- Fix issue 20420 - some expressions are missed during by the inliner
The destructor expression for variable declaration is not scanned, as well as the arguments prefix for the new expression.
https://github.com/dlang/dmd/pull/10627
Comment #2 by dlang-bot — 2019-11-29T03:13:18Z
dlang/dmd pull request #10627 "Fix issue 20420 - some expressions are missed during by the inliner" was merged into stable:
- c9e5c495cba0c629193b8417215b0d3622a82ef3 by سليمان السهمي (Suleyman Sahmi):
Fix issue 20420 - some expressions are missed during by the inliner
The destructor expression for variable declaration is not scanned, as well as the arguments prefix for the new expression.
https://github.com/dlang/dmd/pull/10627