www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21640] New: live no working with templates

https://issues.dlang.org/show_bug.cgi?id=21640

          Issue ID: 21640
           Summary:  live no working with templates
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: jlourenco5691 gmail.com

 live void alloc(T)()
{
    auto p = malloc(4);
} // should not compile with the error: variable `alloc(T).p` is left dangling
at return

void main() {}

--
Feb 15