After fiddling around a bit more, i'm still not satisfied with the proposed Answer!
For grins i did a
Var
b:Boolean;
Begin
Writeln('Test '+b);
How is it, that the compiler throws the error
project1.lpr(7,18) Error: Operator is not overloaded: "Constant String" + "Boolean"
Constant String against Boolean.
So, the compiler recognizes it as a Constant String.
If i overload the "+"-Operator in a String/Boolean and Boolean/String-Combination, all combinations pass, even those with Literals
Writeln('This '+True); //Works!
EDIT:
Everything in
{$mode objfpc}{$H+}
EDIT: OH NONONO
I Reject the Answer.
I just did the same Test as in my first Post, but with Double instead of Integer. It worked in all combinations!
So no, i don't believe it's the "Constant string" and the Error-Message is correct. It's the Integer!
EDIT3:
There is something wrong. I just commented out my operator unit (to force error-messages)
In the combination in question it's still the same error-message, so the error occurs before checking if an (overloaded) operator is available