mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 20:28:13 +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)
|
||||
else if (El is TPasVariable) and (TPasVariable(El).ExportName<>nil) then
|
||||
Result:=ComputeConstString(TPasVariable(El).ExportName,AContext,true)
|
||||
else if (El is TPasType) then
|
||||
Result:=TransformVariableName(El,AContext.Resolver.ResolveAliasType(TPasType(El)).Name,AContext)
|
||||
else
|
||||
Result:=TransformVariableName(El,El.Name,AContext);
|
||||
end;
|
||||
|
@ -6473,6 +6473,7 @@ begin
|
||||
Add(' constructor Create;');
|
||||
Add(' destructor Destroy;');
|
||||
Add(' end;');
|
||||
Add(' TBird = TObject;');
|
||||
Add('constructor tobject.create;');
|
||||
Add('begin end;');
|
||||
Add('destructor tobject.destroy;');
|
||||
@ -6480,6 +6481,7 @@ begin
|
||||
Add('var Obj: tobject;');
|
||||
Add('begin');
|
||||
Add(' obj:=tobject.create;');
|
||||
Add(' obj:=tbird.create;');
|
||||
Add(' obj.destroy;');
|
||||
ConvertProgram;
|
||||
CheckSource('TestClass_TObjectDefaultConstructor',
|
||||
@ -6498,6 +6500,7 @@ begin
|
||||
]),
|
||||
LinesToStr([ // $mod.$main
|
||||
'$mod.Obj = $mod.TObject.$create("Create");',
|
||||
'$mod.Obj = $mod.TObject.$create("Create");',
|
||||
'$mod.Obj.$destroy("Destroy");',
|
||||
'']));
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user