mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 14:29:14 +02:00
pastojs: typecast integer to widechar
git-svn-id: trunk@47407 -
(cherry picked from commit bd8362dfce
)
This commit is contained in:
parent
474a7b9879
commit
c8aa7cd06c
@ -12305,9 +12305,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if to_bt=btChar then
|
else if to_bt in [btChar,btWideChar] then
|
||||||
begin
|
begin
|
||||||
if from_bt=btChar then
|
if from_bt in [btChar,btWideChar] then
|
||||||
begin
|
begin
|
||||||
// char to char
|
// char to char
|
||||||
Result:=ConvertExpression(Param,AContext);
|
Result:=ConvertExpression(Param,AContext);
|
||||||
|
@ -7937,9 +7937,11 @@ begin
|
|||||||
'var',
|
'var',
|
||||||
' c: char;',
|
' c: char;',
|
||||||
' wc: widechar;',
|
' wc: widechar;',
|
||||||
|
' w: word;',
|
||||||
'begin',
|
'begin',
|
||||||
' Fly(wc);',
|
' Fly(wc);',
|
||||||
' Run(c);',
|
' Run(c);',
|
||||||
|
' wc:=WideChar(w);',
|
||||||
'']);
|
'']);
|
||||||
ConvertProgram;
|
ConvertProgram;
|
||||||
CheckSource('TestWideChar_VarArg',
|
CheckSource('TestWideChar_VarArg',
|
||||||
@ -7950,6 +7952,7 @@ begin
|
|||||||
'};',
|
'};',
|
||||||
'this.c = "";',
|
'this.c = "";',
|
||||||
'this.wc = "";',
|
'this.wc = "";',
|
||||||
|
'this.w = 0;',
|
||||||
'']),
|
'']),
|
||||||
LinesToStr([ // this.$main
|
LinesToStr([ // this.$main
|
||||||
'$mod.Fly({',
|
'$mod.Fly({',
|
||||||
@ -7970,6 +7973,7 @@ begin
|
|||||||
' this.p.c = v;',
|
' this.p.c = v;',
|
||||||
' }',
|
' }',
|
||||||
'});',
|
'});',
|
||||||
|
'$mod.wc = String.fromCharCode($mod.w);',
|
||||||
'',
|
'',
|
||||||
'']));
|
'']));
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user