October 02, 2018 [Issue 19285] New: false positive GC inferred | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: eyal@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. -- |
Copyright © 1999-2021 by the D Language Foundation