mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 20:19:25 +02:00
pastojs: fixed ord(widechar)
git-svn-id: trunk@47408 -
This commit is contained in:
parent
bd8362dfce
commit
fb87b423fe
@ -13068,7 +13068,7 @@ begin
|
||||
bt:=ParamResolved.BaseType;
|
||||
if bt=btRange then
|
||||
bt:=ParamResolved.SubType;
|
||||
if bt=btChar then
|
||||
if bt in [btChar,btWideChar] then
|
||||
begin
|
||||
if Param is TParamsExpr then
|
||||
begin
|
||||
|
@ -294,7 +294,7 @@ type
|
||||
Procedure TestBaseType_RawByteStringFail;
|
||||
Procedure TestTypeShortstring_Fail;
|
||||
Procedure TestCharSet_Custom;
|
||||
Procedure TestWideChar_VarArg;
|
||||
Procedure TestWideChar;
|
||||
Procedure TestForCharDo;
|
||||
Procedure TestForCharInDo;
|
||||
|
||||
@ -7924,7 +7924,7 @@ begin
|
||||
'']));
|
||||
end;
|
||||
|
||||
procedure TTestModule.TestWideChar_VarArg;
|
||||
procedure TTestModule.TestWideChar;
|
||||
begin
|
||||
StartProgram(false);
|
||||
Add([
|
||||
@ -7942,6 +7942,7 @@ begin
|
||||
' Fly(wc);',
|
||||
' Run(c);',
|
||||
' wc:=WideChar(w);',
|
||||
' w:=ord(wc);',
|
||||
'']);
|
||||
ConvertProgram;
|
||||
CheckSource('TestWideChar_VarArg',
|
||||
@ -7974,6 +7975,7 @@ begin
|
||||
' }',
|
||||
'});',
|
||||
'$mod.wc = String.fromCharCode($mod.w);',
|
||||
'$mod.w = $mod.wc.charCodeAt();',
|
||||
'',
|
||||
'']));
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user