www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18802] New: [REG2.080] Safe block causing lifetime problem


          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 puremagic.com
          Reporter: chalucha gmail.com

        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

Apr 27 2018