The first part is not a bug nor incorrect. It is function overloading — Documentation on MQL5: Language Basics / Functions / Function Overloading
It gives an error when compiling when two function names are the same. But it throws an error when there are variables.
Two functions with the same name should always throw an error when compiling.
The first part is not a bug nor incorrect. It is function overloading — Documentation on MQL5: Language Basics / Functions / Function Overloading
I'm not trying to show that it's a software bug.
I show compile error. If you try the examples you will understand me.
Your topic subject heading, literately says "Complier Bug", so you are trying to show a "bug" and even qualify it with your statement, and I quote "Two functions with the same name should always throw an error when compiling".
I don't need to try the examples, as I already know and understand that no compile error will be given for the first two declarations (because they are valid), but compilation will fail for the last two declarations (because they are invalid).
It seems that it is you that is not understanding things, so I ask you again to please research function overloading — Documentation on MQL5: Language Basics / Functions / Function Overloading
How To Ask Questions The Smart Way. (2004)
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken.
It is almost always your code.
In this case, it is your misunderstanding of function overloading. The first two are fine.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
It gives an error when compiling when two function names are the same. But it throws an error when there are variables.
Two functions with the same name should always throw an error when compiling.