mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-23 08:51:36 +02:00
pastojs: fixed helper constructor
git-svn-id: trunk@41300 -
This commit is contained in:
parent
ddaac687d4
commit
6bbc1db8bb
@ -12742,9 +12742,10 @@ begin
|
||||
P:=TPasElement(El.Members[i]);
|
||||
//writeln('TPasToJSConverter.ConvertClassType methods El[',i,']=',GetObjName(P));
|
||||
if not IsMemberNeeded(P) then continue;
|
||||
C:=P.ClassType;
|
||||
if P is TPasProcedure then
|
||||
begin
|
||||
if IsTObject and (P.ClassType=TPasDestructor) then
|
||||
if IsTObject and (C=TPasDestructor) then
|
||||
begin
|
||||
DestructorName:=TransformVariableName(P,AContext);
|
||||
if DestructorName<>'Destroy' then
|
||||
@ -12756,7 +12757,7 @@ begin
|
||||
AddToSourceElements(Src,AssignSt);
|
||||
end;
|
||||
end
|
||||
else if C.ClassType=TPasConstructor then
|
||||
else if C=TPasConstructor then
|
||||
HasConstructor:=true;
|
||||
NewEl:=ConvertProcedure(TPasProcedure(P),FuncContext);
|
||||
end
|
||||
|
1
utils/pas2js/dist/rtl.js
vendored
1
utils/pas2js/dist/rtl.js
vendored
@ -384,6 +384,7 @@ var rtl = {
|
||||
},
|
||||
|
||||
recNewT: function(parent,name,initfn,full){
|
||||
// create new record type
|
||||
var t = {};
|
||||
if (parent) parent[name] = t;
|
||||
function hide(prop){
|
||||
|
Loading…
Reference in New Issue
Block a user