@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() {}
@ljmf00 created dlang/dmd pull request #12197 "Fix issue #21640: @live not working with templates" fixing this issue: - Fix issue #21640: @live not working with templates Signed-off-by: Luís Ferreira <contact@lsferreira.net> https://github.com/dlang/dmd/pull/12197
Side note: That example is broken (aka not http://sscce.org/ ), aside from the lack of import leading to undefined identifier `malloc`, the template isn't instantiated. But the PR has correct examples.
dlang/dmd pull request #12197 "Fix issue #21640: @live not working with templates" was merged into master: - f0da66d55a73d7271000b7f04fe1ad6d83ca1ef3 by Luís Ferreira: Fix issue #21640: @live not working with templates Signed-off-by: Luís Ferreira <contact@lsferreira.net> https://github.com/dlang/dmd/pull/12197