Просмотр исходного кода

docs(gaps): add gap19 (forward array index) after the revert

The array-index-forward cases (record7, complextypes) are rejected again
after the v3-array-index-fwd revert, so add gap19_fwd_array_index.mod
(decl-order: use-before-declaration) and index it.  Re-verified all 21
sources against the current (reverted) compiler.
Eric Streit 1 день назад
Родитель
Сommit
d91871a0d5
2 измененных файлов с 12 добавлено и 0 удалено
  1. 2 0
      docs/gaps/README.md
  2. 10 0
      docs/gaps/gap19_fwd_array_index.mod

+ 2 - 0
docs/gaps/README.md

@@ -63,6 +63,7 @@ The `class` column says what a change would mean:
 | `gap16-wide-set` | `gap16_wide_set.mod` | `impl-limit` | `not supported yet` | `settest1` |
 | `gap17-set-of-cardinal` | `gap17_set_of_cardinal.mod` | `impl-limit` | `not supported yet` | `settest3` |
 | `gap18-set-case-labels` | `gap18_set_case_labels.mod` | `gm2-ext` | `not supported yet` | `bitset5` |
+| `gap19-fwd-array-index` | `gap19_fwd_array_index.mod` | `decl-order` | `not supported yet` | `record7`, `complextypes` |
 
 First diagnostic (message) per file at commit time (line:col varies as
 comments change):
@@ -87,6 +88,7 @@ gap15b_from_import.mod          undeclared identifier   (red / green)
 gap16_wide_set.mod              not supported yet       (span > 65536)
 gap17_set_of_cardinal.mod       not supported yet       (unbounded base)
 gap18_set_case_labels.mod       not supported yet       (set as CASE selector)
+gap19_fwd_array_index.mod       not supported yet       (array index declared later)
 ```
 
 ## Genuine gaps (worth fixing, standard Modula-2)

+ 10 - 0
docs/gaps/gap19_fwd_array_index.mod

@@ -0,0 +1,10 @@
+MODULE Gap19FwdArrayIndex;
+(* NOT legal Modula-2: an array's index type is declared later in the
+   same TYPE block.  Declaration before use is required; V3 correctly
+   rejects it.  Class: decl-order (gm2 leniency).
+   Corpus: record7, complextypes.
+   V3: not supported yet. *)
+TYPE a = ARRAY idx OF INTEGER;
+     idx = [-2..2];
+VAR x : a;
+BEGIN x[0] := 1 END Gap19FwdArrayIndex.