Missing compiler error for undefined struct methods
To the maintainer of MQL5: Why doesn't this type of code trigger a compiler error?
Because you don't call that method anywhere.
(I'm not a "maintainer of MQL5", whatever that means)
I have something like this, which works as usual:
However, if I have something like this, I would expect the compiler to return an error because no toString() method is defined (and the structure does not allow virtual methods):
To the maintainer of MQL5: Why doesn't this type of code trigger no compiler error? It would be better if the compiler threw an error, because without an error, there's a risk of forgetting to implement a struct method (which would then lead to a runtime error).
Such code
I have something like this, which works as usual:
However, if I have something like this, I would expect the compiler to return an error because no toString() method is defined (and the structure does not allow virtual methods):
To the maintainer of MQL5: Why doesn't this type of code trigger no compiler error? It would be better if the compiler threw an error, because without an error, there's a risk of forgetting to implement a struct method (which would then lead to a runtime error).
Such code