Bug 20181 – [nightly 2019-08-29] internal compiler error when static foreach iterating property method of struct
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-08-29T10:38:35Z
Last change time
2019-09-07T23:21:32Z
Keywords
pull
Assigned to
No Owner
Creator
FeepingCreature
Comments
Comment #0 by default_357-line — 2019-08-29T10:38:35Z
Consider this code:
struct InversionList
{
ubyte[] byCodepoint() { return null; }
}
void main()
{
static foreach (ch; InversionList().byCodepoint) { }
}
On nightly, we encounter an internal compiler error in copyRegionExp because the dotvar expression byCodePoint is not handled in the new region-based ctfe memory management code.
Comment #1 by dlang-bot — 2019-08-29T10:39:20Z
@FeepingCreature updated dlang/dmd pull request #10369 "copyRegionExp: handle dotVariable as a unary expression" fixing this issue:
- Fix issue 20181: copyRegionExp: handle dotVariable as a unary expression
https://github.com/dlang/dmd/pull/10369
Comment #2 by dlang-bot — 2019-09-07T23:21:32Z
dlang/dmd pull request #10369 "copyRegionExp: handle dotVariable as a unary expression" was merged into master:
- 93d27030ab24040023a221b77d56891adc99bb6c by Mathis Beer:
Fix issue 20181: copyRegionExp: handle dotVariable as a unary expression
https://github.com/dlang/dmd/pull/10369