mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 17:29:33 +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;
|
bt:=ParamResolved.BaseType;
|
||||||
if bt=btRange then
|
if bt=btRange then
|
||||||
bt:=ParamResolved.SubType;
|
bt:=ParamResolved.SubType;
|
||||||
if bt=btChar then
|
if bt in [btChar,btWideChar] then
|
||||||
begin
|
begin
|
||||||
if Param is TParamsExpr then
|
if Param is TParamsExpr then
|
||||||
begin
|
begin
|
||||||
|
@ -294,7 +294,7 @@ type
|
|||||||
Procedure TestBaseType_RawByteStringFail;
|
Procedure TestBaseType_RawByteStringFail;
|
||||||
Procedure TestTypeShortstring_Fail;
|
Procedure TestTypeShortstring_Fail;
|
||||||
Procedure TestCharSet_Custom;
|
Procedure TestCharSet_Custom;
|
||||||
Procedure TestWideChar_VarArg;
|
Procedure TestWideChar;
|
||||||
Procedure TestForCharDo;
|
Procedure TestForCharDo;
|
||||||
Procedure TestForCharInDo;
|
Procedure TestForCharInDo;
|
||||||
|
|
||||||
@ -7924,7 +7924,7 @@ begin
|
|||||||
'']));
|
'']));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TTestModule.TestWideChar_VarArg;
|
procedure TTestModule.TestWideChar;
|
||||||
begin
|
begin
|
||||||
StartProgram(false);
|
StartProgram(false);
|
||||||
Add([
|
Add([
|
||||||
@ -7942,6 +7942,7 @@ begin
|
|||||||
' Fly(wc);',
|
' Fly(wc);',
|
||||||
' Run(c);',
|
' Run(c);',
|
||||||
' wc:=WideChar(w);',
|
' wc:=WideChar(w);',
|
||||||
|
' w:=ord(wc);',
|
||||||
'']);
|
'']);
|
||||||
ConvertProgram;
|
ConvertProgram;
|
||||||
CheckSource('TestWideChar_VarArg',
|
CheckSource('TestWideChar_VarArg',
|
||||||
@ -7974,6 +7975,7 @@ begin
|
|||||||
' }',
|
' }',
|
||||||
'});',
|
'});',
|
||||||
'$mod.wc = String.fromCharCode($mod.w);',
|
'$mod.wc = String.fromCharCode($mod.w);',
|
||||||
|
'$mod.w = $mod.wc.charCodeAt();',
|
||||||
'',
|
'',
|
||||||
'']));
|
'']));
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user