[Issue 18802] New: [REG2.080] Safe block causing lifetime problem
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 27 13:07:44 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18802
Issue ID: 18802
Summary: [REG2.080] Safe block causing lifetime problem
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: chalucha at gmail.com
---
@safe
{
struct Foo
{
string[] bars;
this(string[] bars...)
{
this.bars = bars;
}
}
}
void main()
{
auto f = Foo("a", "b", "c");
}
---
Ends with: Error: scope variable bars assigned to this with longer lifetime
With dmd-2.080-beta.1
This worked before
--
More information about the Digitalmars-d-bugs
mailing list