2
0
Эх сурвалжийг харах

* revert 95ad8f16 as Delphi does in fact *not* compile such code, but *does* compile {$REGION 'Foobar} (mind the missing ' at the end!)
* adjusted test #39395 which now fails
+ added test for correct behavior

Sven/Sarah Barth 2 өдөр өмнө
parent
commit
ba6a170292

+ 0 - 2
compiler/scandir.pas

@@ -2154,8 +2154,6 @@ unit scandir;
 
     procedure dir_region;
       begin
-        current_scanner.skipspace;
-        current_scanner.readquotedstring;
       end;
 
     procedure dir_endregion;

+ 9 - 0
tests/tbs/tb0722.pp

@@ -0,0 +1,9 @@
+program tb0722;
+
+{$mode delphi}
+
+{$region 'foobar}
+
+begin
+
+end.

+ 6 - 0
tests/webtbs/tw39395.pp

@@ -1,3 +1,9 @@
+{ %FAIL }
+
+{ Note: this was original added as a succeeding test, but it turns out in Delphi
+        this does not compile either, because Delphi treats it as a comment and
+        not a string }
+
 {$mode delphi}
 
 {$region ' { somelabel } '}