mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:49:20 +02:00
pastojs: fixed clone array of tobject, pas2js issue 39238
This commit is contained in:
parent
1b6982107f
commit
3e181d7640
@ -16977,7 +16977,8 @@ begin
|
|||||||
MaxIndex:=length(El.Ranges)-1;
|
MaxIndex:=length(El.Ranges)-1;
|
||||||
|
|
||||||
UseSlice:=(ElTypeLo is TPasUnresolvedSymbolRef)
|
UseSlice:=(ElTypeLo is TPasUnresolvedSymbolRef)
|
||||||
or (ElTypeLo is TPasRangeType);
|
or (ElTypeLo is TPasRangeType)
|
||||||
|
or ((ElTypeLo is TPasClassType) and (TPasClassType(ElTypeLo).ObjKind in [okClass]));
|
||||||
ForLoop:=nil;
|
ForLoop:=nil;
|
||||||
if UseSlice then
|
if UseSlice then
|
||||||
// static array of a base type -> inner loop is replaced with slice(0)
|
// static array of a base type -> inner loop is replaced with slice(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user