mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-07 16:58:10 +02:00
pastojs: fixed TExt(TExt.new)
This commit is contained in:
parent
48cc8cdc77
commit
a86857dd15
@ -7556,7 +7556,7 @@ begin
|
||||
else if aResolver.IsExternalClassConstructor(RightRefDecl) then
|
||||
begin
|
||||
// e.g. mod.ExtClass.new;
|
||||
if El.Parent is TParamsExpr then
|
||||
if (El.Parent is TParamsExpr) and (TParamsExpr(El.Parent).Value=El) then
|
||||
// Note: ExtClass.new() is handled in ConvertFuncParams
|
||||
RaiseNotSupported(El,AContext,20190116135818);
|
||||
Result:=ConvertExternalConstructor(El.left,RightRef,nil,AContext);
|
||||
|
@ -15757,6 +15757,7 @@ begin
|
||||
Add(' A: texta;');
|
||||
Add('begin');
|
||||
Add(' a:=texta.new;');
|
||||
Add(' a:=texta(texta.new);');
|
||||
Add(' a:=texta.new();');
|
||||
Add(' a:=texta.new(1);');
|
||||
Add(' with texta do begin');
|
||||
@ -15775,6 +15776,7 @@ begin
|
||||
LinesToStr([ // $mod.$main
|
||||
'$mod.A = new ExtA();',
|
||||
'$mod.A = new ExtA();',
|
||||
'$mod.A = new ExtA();',
|
||||
'$mod.A = new ExtA(1,2);',
|
||||
'$mod.A = new ExtA();',
|
||||
'$mod.A = new ExtA();',
|
||||
|
Loading…
Reference in New Issue
Block a user