mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 03:46:10 +02:00
pastojs: error on anynomous record
git-svn-id: trunk@41851 -
This commit is contained in:
parent
851740a945
commit
22777fee94
@ -3191,6 +3191,8 @@ end;
|
|||||||
procedure TPas2JSResolver.AddRecordType(El: TPasRecordType);
|
procedure TPas2JSResolver.AddRecordType(El: TPasRecordType);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
if El.Name='' then
|
||||||
|
RaiseNotYetImplemented(20190408224556,El,'anonymous record type');
|
||||||
if El.Parent is TProcedureBody then
|
if El.Parent is TProcedureBody then
|
||||||
// local record
|
// local record
|
||||||
AddElevatedLocal(El);
|
AddElevatedLocal(El);
|
||||||
|
@ -1915,6 +1915,7 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
aFilename: String;
|
aFilename: String;
|
||||||
begin
|
begin
|
||||||
|
//writeln('TPas2jsFilesCache.FindUnitFileName "',aUnitname,'" ModuleDir="',ModuleDir,'"');
|
||||||
Result:='';
|
Result:='';
|
||||||
IsForeign:=false;
|
IsForeign:=false;
|
||||||
SearchedDirs:=TStringList.Create;
|
SearchedDirs:=TStringList.Create;
|
||||||
|
@ -461,6 +461,7 @@ type
|
|||||||
Procedure TestRecord_Const;
|
Procedure TestRecord_Const;
|
||||||
Procedure TestRecord_TypecastFail;
|
Procedure TestRecord_TypecastFail;
|
||||||
Procedure TestRecord_InFunction;
|
Procedure TestRecord_InFunction;
|
||||||
|
Procedure TestRecord_AnonymousFail;
|
||||||
// ToDo: RTTI of local record
|
// ToDo: RTTI of local record
|
||||||
// ToDo: pcu local record, name clash and rtti
|
// ToDo: pcu local record, name clash and rtti
|
||||||
|
|
||||||
@ -10601,6 +10602,18 @@ begin
|
|||||||
'']));
|
'']));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTestModule.TestRecord_AnonymousFail;
|
||||||
|
begin
|
||||||
|
StartProgram(false);
|
||||||
|
Add([
|
||||||
|
'var',
|
||||||
|
' r: record x: word end;',
|
||||||
|
'begin']);
|
||||||
|
SetExpectedPasResolverError('not yet implemented: :TPasRecordType [20190408224556] anonymous record type',
|
||||||
|
nNotYetImplemented);
|
||||||
|
ConvertProgram;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TTestModule.TestAdvRecord_Function;
|
procedure TTestModule.TestAdvRecord_Function;
|
||||||
begin
|
begin
|
||||||
StartProgram(false);
|
StartProgram(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user