I think it's a bug, judging by the error - ME5 compiler can't distinguish function description from its implementation (even though ME4 could distinguish) and thinks they are two different functions with the same name.
This is ambiguous. It looks awfully crooked, we could do without it by introducing another header.
No, it doesn't.
In MQL4 this construction does not cause errors and everything works
logically should not work, which is what the compiler explicitly says.
Why shouldn't it? In 1.mqh the function is declared, in 1.mq5 its implementation, in 2.mq5 it is used
One function is definition, the other import.
Why do you have to do such a mess in the first place? Include a header with an import from itself?
Why do such a mess at all? Include a header with imports of its own?
I think it's a bug, judging by the error - ME5 compiler can't distinguish function description from its implementation (even though ME4 could distinguish) and thinks they are two different functions with the same name.