Explorar el Código

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

florian hace 1 mes
padre
commit
975e5d0498
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
  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;