January 01, 2022 [Issue 22641] New: dmd reports wrong line number (Error: expression ... is not a valid template value argument) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22641 Issue ID: 22641 Summary: dmd reports wrong line number (Error: expression ... is not a valid template value argument) Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: kdevel@vogtner.de maybe related: Issue 21960 - Error in enum implicit conversion to string reports wrong line number. Code from forum post [1] ```d.d class R { } void foo (R r) { } alias fn = void function (R); void lyr (fn F) (R r) { } immutable fn foo_ptr = &foo; // line 14 pragma (msg, typeof (foo_ptr)); auto ptr = lyr!(foo_ptr); // line 17 ``` $ dmd -c d.d immutable(void function(R)) d.d(14): Error: expression `& foo` is not a valid template value argument expected: Error reported for line number 17. [1] https://forum.dlang.org/thread/tjafunqytzjtupczizgt@forum.dlang.org -- |
Copyright © 1999-2021 by the D Language Foundation