Bug 14858 – spurious "Error: overload alias 'foo' is not a variable" when overloading template and non-template via aliases

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-08-01T18:45:00Z
Last change time
2017-08-02T08:07:22Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
ag0aep6g
Blocks
15311

Comments

Comment #0 by ag0aep6g — 2015-08-01T18:45:15Z
Reported by vitus to D.learn: http://forum.dlang.org/post/[email protected] ---- 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; ----
Comment #1 by k.hara.pg — 2015-08-02T12:45:47Z
Comment #2 by github-bugzilla — 2015-09-15T12:05:31Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/803da8f10c0c5d09da5b19274ba1a1b9763d5e03 fix Issue 14858 - spurious "Error: overload alias 'foo' is not a variable" when overloading template and non-template via aliases https://github.com/D-Programming-Language/dmd/commit/e91a6ac45b6adc2d8080df14caca0b62cad19a9b Merge pull request #4857 from 9rnsr/fix14858 Issue 14858 - spurious "Error: overload alias 'foo' is not a variable" when overloading template and non-template via aliases
Comment #3 by k.hara.pg — 2015-09-27T00:31:38Z
*** Issue 15120 has been marked as a duplicate of this issue. ***
Comment #4 by github-bugzilla — 2017-08-02T08:07:22Z
Commit pushed to dmd-cxx at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/56edd1af4bddce6752105dafacac9653d9fe2cdb Issue 14858 - spurious "Error: overload alias foo is not a variable" when overloading template and non-template via aliases