* support unicodestring constants in "case string of" (mantis #29353)

git-svn-id: trunk@32970 -
This commit is contained in:
Jonas Maebe 2016-01-20 21:11:26 +00:00
parent 9ace5ad038
commit a65ab73e8b
3 changed files with 25 additions and 1 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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
View 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.