September 10 [Issue 24759] New: Order-dependent failure to create an overload set with template function | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24759 Issue ID: 24759 Summary: Order-dependent failure to create an overload set with template function Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: maxsamukha@gmail.com module b; void foo() {} ---- module a; import b; void foo(T)(T a) {} alias foo = b.foo; void main() { foo(); foo(1); } ---- a.d(6): Error: alias `a.foo` conflicts with template `a.foo(T)(T a)` at a.d(5) The test case compiles if the alias declaration preceeds the template declaration. -- |
Copyright © 1999-2021 by the D Language Foundation