Browse Source

fcl-passrc: resolver: error on nested class

git-svn-id: trunk@37805 -
Mattias Gaertner 7 years ago
parent
commit
d5f2de61a4
1 changed files with 10 additions and 0 deletions
  1. 10 0
      packages/fcl-passrc/src/pasresolver.pp

+ 10 - 0
packages/fcl-passrc/src/pasresolver.pp

@@ -6704,6 +6704,9 @@ begin
   if not (TopScope is TPasIdentifierScope) then
     RaiseInvalidScopeForElement(20160922163510,El);
 
+  if not (TopScope is TPasSectionScope) then
+    RaiseNotYetImplemented(20171225110934,El,'nested classes');
+
   Duplicate:=TPasIdentifierScope(TopScope).FindIdentifier(El.Name);
   //if Duplicate<>nil then
     //writeln('  Duplicate=',GetObjName(Duplicate.Element),' ',ord(Duplicate.Kind));
@@ -10476,6 +10479,13 @@ begin
   OnlyTypeMembers:=false;
   if StartScope is TPasDotIdentifierScope then
     begin
+    if Ref=nil then
+      begin
+      {$IFDEF VerbosePasResolver}
+      writeln('TPasResolver.CheckFoundElement FindData.Found=',GetObjName(FindData.Found),' StartScope=',GetObjName(StartScope));
+      {$ENDIF}
+      RaiseNotYetImplemented(20171225110626,FindData.ErrorPosEl);
+      end;
     OnlyTypeMembers:=TPasDotIdentifierScope(StartScope).OnlyTypeMembers;
     Include(Ref.Flags,rrfDotScope);
     if TPasDotIdentifierScope(StartScope).ConstParent then