File: Test14

package info (click to toggle)
omake 0.10.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,076 kB
  • sloc: ml: 49,729; ansic: 5,163; makefile: 688; sh: 110
file content (25 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
A[] = key

#
# XXX: Note that if map is private, then the export will not work.
# This is because Sequence.foreach contains an unqualified export,
# and unqualified exports do not export the static/private environment.
#
Test(map) =
   public.map = $(map)
   A.foreach(key) =>
      map = $(map.add $(key), new)
      export map

   new = $(map.find key)
   if $(equal $(new), new)
      println($"export map worked [SUCCESS]")
   else
      eprintln($"export map had no effect [FAILURE]")
      exit 1

X. =
   extends $(Map)
   $|key| = old

Test($X)