mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-02-04 07:14:50 +01:00
* support unicodestring constants in "case string of" (mantis #29353)
git-svn-id: trunk@32970 -
This commit is contained in:
parent
9ace5ad038
commit
a65ab73e8b
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -14926,6 +14926,7 @@ tests/webtbs/tw29250.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw2926.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2927.pp svneol=native#text/plain
|
||||
tests/webtbs/tw29321.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw29353.pp -text svneol=native#text/plain
|
||||
tests/webtbs/tw2942a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2942b.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2943.pp svneol=native#text/plain
|
||||
|
||||
@ -262,7 +262,7 @@ implementation
|
||||
concatwidestringchar(pWideStringVal, tcompilerwidechar(tordconstnode(p).value.uvalue));
|
||||
result:=cstringconstnode.createunistr(pWideStringVal);
|
||||
end
|
||||
else if is_conststringnode(p) then
|
||||
else if p.nodetype=stringconstn then
|
||||
result:=tstringconstnode(p.getcopy)
|
||||
else
|
||||
begin
|
||||
|
||||
23
tests/webtbs/tw29353.pp
Executable file
23
tests/webtbs/tw29353.pp
Executable file
@ -0,0 +1,23 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
{$codepage UTF8}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Classes
|
||||
{ you can add units after this };
|
||||
|
||||
Var
|
||||
AString : String;
|
||||
begin
|
||||
AString := 'öö';
|
||||
Case AString of
|
||||
'öö' : WriteLn('match');
|
||||
else
|
||||
halt(1);
|
||||
end;
|
||||
end.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user