Re: Multiple functions, same signature

2018-07-11 Thread Seb via Digitalmars-d
On Wednesday, 11 July 2018 at 15:58:05 UTC, Luís Marques wrote: I was surprised to find out today that this compiles: void foo() {} void foo() {} void main() {} Is it a bug, or just a weird design decision? "alphaglosined" on IRC seemed to think it was a regression. Please confirm, so that I

Re: Multiple functions, same signature

2018-07-11 Thread Luís Marques via Digitalmars-d
On Wednesday, 11 July 2018 at 16:21:26 UTC, Jacob Carlborg wrote: You'll get an error if you call "foo". I understand that. Still seems like something that the frontend should detect, unless there's a good use case for multiple (re)definitions. If I had to guess, it's probably to support

Re: Multiple functions, same signature

2018-07-11 Thread Jacob Carlborg via Digitalmars-d
On 2018-07-11 17:58, Luís Marques wrote: I was surprised to find out today that this compiles: void foo() {} void foo() {} void main() {} Is it a bug, or just a weird design decision? "alphaglosined" on IRC seemed to think it was a regression. Please confirm, so that I can file a bug, or

Re: Multiple functions, same signature

2018-07-11 Thread Luís Marques via Digitalmars-d
On Wednesday, 11 July 2018 at 16:01:48 UTC, John Colvin wrote: On Wednesday, 11 July 2018 at 15:58:05 UTC, Luís Marques wrote: Definitely a change, but it always compiled, it just used to fail to link Do you know why the frontend doesn't complain about a redefinition, like C++ does?

Re: Multiple functions, same signature

2018-07-11 Thread John Colvin via Digitalmars-d
On Wednesday, 11 July 2018 at 15:58:05 UTC, Luís Marques wrote: I was surprised to find out today that this compiles: void foo() {} void foo() {} void main() {} Is it a bug, or just a weird design decision? "alphaglosined" on IRC seemed to think it was a regression. Please confirm, so that I

Re: Multiple functions, same signature

2018-07-11 Thread rikki cattermole via Digitalmars-d
On 12/07/2018 3:58 AM, Luís Marques wrote: I was surprised to find out today that this compiles: void foo() {} void foo() {} void main() {} Is it a bug, or just a weird design decision? "alphaglosined" on IRC seemed to think it was a regression. Please confirm, so that I can file a bug, or

Multiple functions, same signature

2018-07-11 Thread Luís Marques via Digitalmars-d
I was surprised to find out today that this compiles: void foo() {} void foo() {} void main() {} Is it a bug, or just a weird design decision? "alphaglosined" on IRC seemed to think it was a regression. Please confirm, so that I can file a bug, or understand the design decision rationale.