Commit 60bd9c5b authored by FPK's avatar FPK
Browse files

* write a proper error message if types are read/written which are not...

  * write a proper error message if types are read/written which are not supported in iso mode, resolves #37763

git-svn-id: trunk@46885 -
parent e2647ea0
......@@ -16577,6 +16577,7 @@ tests/webtbf/tw37460.pp svneol=native#text/pascal
tests/webtbf/tw37462.pp svneol=native#text/pascal
tests/webtbf/tw37475.pp svneol=native#text/pascal
tests/webtbf/tw37476.pp svneol=native#text/pascal
tests/webtbf/tw37763.pp svneol=native#text/pascal
tests/webtbf/tw3790.pp svneol=native#text/plain
tests/webtbf/tw3812.pp svneol=native#text/plain
tests/webtbf/tw3930a.pp svneol=native#text/plain
......@@ -2064,6 +2064,9 @@ type_e_forward_interface_type_does_not_match=04127_E_The interface type of the f
type_e_generic_const_type_not_allowed=04128_E_Type not allowed for generic constant parameter: $1
% Only types that can also be used (indirectly) for untyped constants can be used as a
% type for a generic constant parameter.
type_e_cant_read_write_type_in_iso_mode=04129_E_Can't read or write variables of this type in iso mode
% You are trying to \var{read} or \var{write} a variable from or to a
% file of type text, which doesn't support that variable's type in the selected language mode (iso mode).
% \end{description}
#
# Symtable
......
......@@ -585,6 +585,7 @@
type_e_cblock_callconv=04126;
type_e_forward_interface_type_does_not_match=04127;
type_e_generic_const_type_not_allowed=04128;
type_e_cant_read_write_type_in_iso_mode=04129;
sym_e_id_not_found=05000;
sym_f_internal_error_in_symtablestack=05001;
sym_e_duplicate_id=05002;
......@@ -1126,9 +1127,9 @@
option_info=11024;
option_help_pages=11025;
MsgTxtSize = 85732;
MsgTxtSize = 85795;
MsgIdxMax : array[1..20] of longint=(
28,106,356,129,99,63,143,36,223,68,
28,106,356,130,99,63,143,36,223,68,
62,20,30,1,1,1,1,1,1,1
);
This diff is collapsed.
......@@ -765,7 +765,14 @@ if (def.typ=recorddef) and not (m_delphi in current_settings.modes
else
case para.left.resultdef.typ of
stringdef :
name:=procprefixes[do_read]+tstringdef(para.left.resultdef).stringtypname;
begin
name:=procprefixes[do_read]+tstringdef(para.left.resultdef).stringtypname;
if (m_isolike_io in current_settings.modeswitches) and (tstringdef(para.left.resultdef).stringtype<>st_shortstring) then
begin
CGMessagePos(para.fileinfo,type_e_cant_read_write_type_in_iso_mode);
error_para := true;
end;
end;
pointerdef :
begin
if (not is_pchar(para.left.resultdef)) or do_read then
......
{ %fail }
{$MODE ISO}
program forum(output);
var f:rawbytestring;
begin
writeln(f)
end.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment