August 01, 2015 [Issue 14858] New: spurious "Error: overload alias 'foo' is not a variable" when overloading template and non-template via aliases | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14858 Issue ID: 14858 Summary: spurious "Error: overload alias 'foo' is not a variable" when overloading template and non-template via aliases Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Keywords: rejects-valid Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: ag0aep6g@gmail.com Reported by vitus to D.learn: http://forum.dlang.org/post/dhqqkndwgljtxnycziyo@forum.dlang.org ---- void foo()(){} void bar(int){} alias foobar = foo; alias foobar = bar; void main() { foobar(1); /* Error: overload alias 'foo' is not a variable */ } ---- Works when when the call has a leading dot: ---- .foobar(1); ---- Works when the order of the aliases is switched: ---- alias foobar = bar; alias foobar = foo; ---- -- |
Copyright © 1999-2021 by the D Language Foundation