Feature/mismatch type in for assigment
Solves #5994.
A few notes:
- I don't know where is the correct place to put this check (I don't think it is where I put it, but moving is easier than implementing).
- How should this test be disabled (for example when not wanting warnings), I don't know the current method.
- How should I decide on the error message? Should it be normalized to some standard or taken from somewhere?
Sorry .. I suggested that you would move this to CheckFunction but now I think CheckType would be better.
@danmar I struggle with a strange behaviour - When running the compiled binary on the code in the test, it prints the error as expected, but in the test it fails the assert, saying no output was generated. Have you ever encountered that before?
I guess it's because TestType does not load the std.cfg.
But it can also be because the code is not normally preprocessed in the testrunner. You can't use preprocessor commands and you can't use tabs anywhere in the code.