pastojs: typecast string(unicodestring), unicodestring(string)

git-svn-id: trunk@41224 -
This commit is contained in:
Mattias Gaertner 2019-02-04 16:02:42 +00:00
parent cfe65c8cd8
commit bf1af93938
2 changed files with 12 additions and 4 deletions

View File

@ -1183,8 +1183,8 @@ const
];
bfAllJSBaseProcs = bfAllStandardProcs;
btAllJSStrings = [btString];
btAllJSChars = [btChar];
btAllJSStrings = [btString,btUnicodeString];
btAllJSChars = [btChar,btWideChar];
btAllJSStringAndChars = btAllJSStrings+btAllJSChars;
btAllJSFloats = [btDouble];
btAllJSBooleans = [btBoolean];

View File

@ -6679,6 +6679,10 @@ begin
'{$H+}',
'const',
' a = #$00F3#$017C;', // first <256, then >=256
' b = string(''a'');',
' c = string(''ä'');',
' d = UnicodeString(''b'');',
' e = UnicodeString(''ö'');',
'var',
' s: string = ''abc'';',
'begin',
@ -6699,8 +6703,12 @@ begin
CheckSource('TestStringConst',
LinesToStr([
'this.a = "óż";',
'this.s="abc";'
]),
'this.b = "a";',
'this.c = "ä";',
'this.d = "b";',
'this.e = "ö";',
'this.s="abc";',
'']),
LinesToStr([
'$mod.s="";',
'$mod.s="\r\n";',