mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 14:10:57 +01:00
* openstring now uses a type in the system unit
git-svn-id: trunk@3053 -
This commit is contained in:
parent
5d4300fd45
commit
2ee71781a7
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6760,6 +6760,7 @@ tests/webtbs/tw4778.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4789.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4809.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4826.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4881.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4893a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4893b.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4893c.pp svneol=native#text/plain
|
||||
|
||||
@ -518,26 +518,15 @@ implementation
|
||||
end
|
||||
else
|
||||
begin
|
||||
if (m_mac in aktmodeswitches) then
|
||||
try_to_consume(_UNIV); {currently does nothing}
|
||||
single_type(tt,false);
|
||||
|
||||
{ open string ? }
|
||||
if (varspez in [vs_out,vs_var]) and
|
||||
(
|
||||
(
|
||||
((token=_STRING) or (idtoken=_SHORTSTRING)) and
|
||||
(cs_openstring in aktmoduleswitches) and
|
||||
not(cs_ansistrings in aktlocalswitches)
|
||||
) or
|
||||
(idtoken=_OPENSTRING)) then
|
||||
begin
|
||||
consume(token);
|
||||
tt:=openshortstringtype;
|
||||
end
|
||||
else
|
||||
begin
|
||||
{ everything else }
|
||||
if (m_mac in aktmodeswitches) then
|
||||
try_to_consume(_UNIV); {currently does nothing}
|
||||
single_type(tt,false);
|
||||
end;
|
||||
(cs_openstring in aktmoduleswitches) and
|
||||
is_shortstring(tt.def) then
|
||||
tt:=openshortstringtype;
|
||||
|
||||
if (target_info.system in [system_powerpc_morphos,system_m68k_amiga]) then
|
||||
begin
|
||||
|
||||
@ -240,6 +240,7 @@ implementation
|
||||
{$endif support_longstring}
|
||||
addtype('AnsiString',cansistringtype);
|
||||
addtype('WideString',cwidestringtype);
|
||||
addtype('OpenString',openshortstringtype);
|
||||
addtype('Boolean',booltype);
|
||||
addtype('ByteBool',booltype);
|
||||
adddef('WordBool',torddef.create(bool16bit,0,1));
|
||||
|
||||
14
tests/webtbs/tw4881.pp
Normal file
14
tests/webtbs/tw4881.pp
Normal file
@ -0,0 +1,14 @@
|
||||
{ Source provided for Free Pascal Bug Report 4881 }
|
||||
{ Submitted by "Jasper Neumann" on 2006-03-07 }
|
||||
{ e-mail: _-jane-_@web.de }
|
||||
type
|
||||
openstring=integer;
|
||||
|
||||
procedure test(var x:openstring);
|
||||
begin end;
|
||||
|
||||
var
|
||||
x: openstring;
|
||||
begin
|
||||
test(x);
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user