Browse Source

* patch by rasberryrabbit to solve another internal error reported in #41487

florian 1 month ago
parent
commit
975e5d0498
2 changed files with 6 additions and 2 deletions
  1. 1 2
      compiler/scanner.pas
  2. 5 0
      tests/webtbs/tw41487.pp

+ 1 - 2
compiler/scanner.pas

@@ -1587,13 +1587,12 @@ type
           dispose(pnormalset(value.valueptr));
           dispose(pnormalset(value.valueptr));
         constguid :
         constguid :
           dispose(pguid(value.valueptr));
           dispose(pguid(value.valueptr));
+        constnil,
         constpointer,
         constpointer,
         constord,
         constord,
         { error values }
         { error values }
         constnone:
         constnone:
           ;
           ;
-        else
-          internalerror(2013112802);
       end;
       end;
       inherited destroy;
       inherited destroy;
     end;
     end;

+ 5 - 0
tests/webtbs/tw41487.pp

@@ -11,6 +11,11 @@ const
     {$MESSAGE 'ACONSTANT is not equal to b'}
     {$MESSAGE 'ACONSTANT is not equal to b'}
   {$endif}
   {$endif}
 
 
+const
+  ptr = nil;
+
+{$if ptr <> pointer(5)}
+{$endif}
 
 
 type
 type
   PRECORD = ^TRECORD;
   PRECORD = ^TRECORD;