[Issue 20649] New: _d_arraysetlengthT crashes when std.traits.ReturnType is used with auto function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 9 09:03:06 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20649
Issue ID: 20649
Summary: _d_arraysetlengthT crashes when std.traits.ReturnType
is used with auto function
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: menodinulla at gmail.com
The following code causes `object.Error@(0): Access Violation` at `ss.length =
1` on Windows 64bit.
--- app.d
import std.traits;
struct S { int i; }
auto f()
{
S[] ss;
ss.length = 1;
}
alias a = ReturnType!f;
void main()
{
f();
}
---
Tested on the following versions.
- dmd-2.090.0
- dmd-2.091.0-rc.1
--
More information about the Digitalmars-d-bugs
mailing list