[Issue 19285] New: false positive GC inferred
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 2 21:31:49 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19285
Issue ID: 19285
Summary: false positive GC inferred
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: eyal at weka.io
No GC is actually used here:
void f(bool cond, string s) @nogc {
auto inner() { return s; }
alias Unused1 = typeof(inner); // OK
alias Unused2 = typeof(&inner); // INFERS GC
}
This is especially interesting when trying to use functionAttribute!inner and
others that internally "take address" (not really) of the given function and
wrongly infer GC is needed.
--
More information about the Digitalmars-d-bugs
mailing list