mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 17:09:16 +02:00
pastojs: fixed using type alias
git-svn-id: trunk@37399 -
This commit is contained in:
parent
a8fed34f99
commit
204ef5ac01
@ -12660,6 +12660,8 @@ begin
|
|||||||
Result:=ComputeConstString(TPasProcedure(El).LibrarySymbolName,AContext,true)
|
Result:=ComputeConstString(TPasProcedure(El).LibrarySymbolName,AContext,true)
|
||||||
else if (El is TPasVariable) and (TPasVariable(El).ExportName<>nil) then
|
else if (El is TPasVariable) and (TPasVariable(El).ExportName<>nil) then
|
||||||
Result:=ComputeConstString(TPasVariable(El).ExportName,AContext,true)
|
Result:=ComputeConstString(TPasVariable(El).ExportName,AContext,true)
|
||||||
|
else if (El is TPasType) then
|
||||||
|
Result:=TransformVariableName(El,AContext.Resolver.ResolveAliasType(TPasType(El)).Name,AContext)
|
||||||
else
|
else
|
||||||
Result:=TransformVariableName(El,El.Name,AContext);
|
Result:=TransformVariableName(El,El.Name,AContext);
|
||||||
end;
|
end;
|
||||||
|
@ -6473,6 +6473,7 @@ begin
|
|||||||
Add(' constructor Create;');
|
Add(' constructor Create;');
|
||||||
Add(' destructor Destroy;');
|
Add(' destructor Destroy;');
|
||||||
Add(' end;');
|
Add(' end;');
|
||||||
|
Add(' TBird = TObject;');
|
||||||
Add('constructor tobject.create;');
|
Add('constructor tobject.create;');
|
||||||
Add('begin end;');
|
Add('begin end;');
|
||||||
Add('destructor tobject.destroy;');
|
Add('destructor tobject.destroy;');
|
||||||
@ -6480,6 +6481,7 @@ begin
|
|||||||
Add('var Obj: tobject;');
|
Add('var Obj: tobject;');
|
||||||
Add('begin');
|
Add('begin');
|
||||||
Add(' obj:=tobject.create;');
|
Add(' obj:=tobject.create;');
|
||||||
|
Add(' obj:=tbird.create;');
|
||||||
Add(' obj.destroy;');
|
Add(' obj.destroy;');
|
||||||
ConvertProgram;
|
ConvertProgram;
|
||||||
CheckSource('TestClass_TObjectDefaultConstructor',
|
CheckSource('TestClass_TObjectDefaultConstructor',
|
||||||
@ -6498,6 +6500,7 @@ begin
|
|||||||
]),
|
]),
|
||||||
LinesToStr([ // $mod.$main
|
LinesToStr([ // $mod.$main
|
||||||
'$mod.Obj = $mod.TObject.$create("Create");',
|
'$mod.Obj = $mod.TObject.$create("Create");',
|
||||||
|
'$mod.Obj = $mod.TObject.$create("Create");',
|
||||||
'$mod.Obj.$destroy("Destroy");',
|
'$mod.Obj.$destroy("Destroy");',
|
||||||
'']));
|
'']));
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user