Implicit Typecast Failure
Original Reporter info from Mantis: n7hmw
-
Reporter name: John
Original Reporter info from Mantis: n7hmw
- Reporter name: John
Description:
In the Free Pascal IDE, a global variable is defined as char. In a procedure, an attempt is made to set the variable to null using VariableName := '';. A compiler error is returned: Incompatible types: got "Constant String" expected "Char". An explicit typecast works as expected.
Steps to reproduce:
Var
MyVar : char;
Procedure MyProc;
Begin
MyVar := ''; (* <-- two single-quotes *)
End;
Begin
End.
Mantis conversion info:
- Mantis ID: 38504
- OS: Windows 10
- OS Build: 1909
- Platform: x64
- Version: 3.2.0
- Fixed in version: 3.3.1
- Fixed in revision: 48759 (#60c8b71b)