mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-29 19:51:22 +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
|
else if aResolver.IsExternalClassConstructor(RightRefDecl) then
|
||||||
begin
|
begin
|
||||||
// e.g. mod.ExtClass.new;
|
// 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
|
// Note: ExtClass.new() is handled in ConvertFuncParams
|
||||||
RaiseNotSupported(El,AContext,20190116135818);
|
RaiseNotSupported(El,AContext,20190116135818);
|
||||||
Result:=ConvertExternalConstructor(El.left,RightRef,nil,AContext);
|
Result:=ConvertExternalConstructor(El.left,RightRef,nil,AContext);
|
||||||
|
@ -15757,6 +15757,7 @@ begin
|
|||||||
Add(' A: texta;');
|
Add(' A: texta;');
|
||||||
Add('begin');
|
Add('begin');
|
||||||
Add(' a:=texta.new;');
|
Add(' a:=texta.new;');
|
||||||
|
Add(' a:=texta(texta.new);');
|
||||||
Add(' a:=texta.new();');
|
Add(' a:=texta.new();');
|
||||||
Add(' a:=texta.new(1);');
|
Add(' a:=texta.new(1);');
|
||||||
Add(' with texta do begin');
|
Add(' with texta do begin');
|
||||||
@ -15775,6 +15776,7 @@ begin
|
|||||||
LinesToStr([ // $mod.$main
|
LinesToStr([ // $mod.$main
|
||||||
'$mod.A = new ExtA();',
|
'$mod.A = new ExtA();',
|
||||||
'$mod.A = new ExtA();',
|
'$mod.A = new ExtA();',
|
||||||
|
'$mod.A = new ExtA();',
|
||||||
'$mod.A = new ExtA(1,2);',
|
'$mod.A = new ExtA(1,2);',
|
||||||
'$mod.A = new ExtA();',
|
'$mod.A = new ExtA();',
|
||||||
'$mod.A = new ExtA();',
|
'$mod.A = new ExtA();',
|
||||||
|
Loading…
Reference in New Issue
Block a user