Artifact 8e138cd6d7f1a6bf314bfcc77156d61ecb9c530a3bbb8f0c6daa7612aca2e93a:
- File typeparse/tests_tclsh/t28_type_deref.tcl.out — part of check-in [eacc36058b] at 2026-11-27 09:47:31 on branch tip-764_tcl90 — v17z Review of sum type notation. - A variant of a sum is metadata, it must not appeat into the value : If there is ambiguity to choose a variant of a sum, it must be an error. - New commands to request variants of a sum type, or of a litteral sum : type variant $v ?NAME? : empty for a litteral ; NAME select the variant of the value. type variant -of T ?NAME? type literal -of T ; type is {sum?}T type is {enum?}T - New command to compare the type of a value : type eq T1 T2 : true is types T1 and T2 are equal type include T1 T2 : true if type T2 is included into T1 - New type 'num' (user: Florentis, size: 768) [annotate] [blame] [check-ins using]
liens : ::A ::B ::C valeurs : 1 2 3 (list<int>) le lien suit B (20), l'instantane reste fige : 1 2 3 nouvel instantane : 1 20 3 1 type deref: at 2: can't read "::C": no such variable refs inchange : ::A ::B ::C dict : x 1 y 20 (dict<int>) imbrique: {1 20} {20 1} (list<list<int>>) produit : 1 hello (deref(lien)) sans lien : 1 2 (list<int>) var brut : 1 un niveau : ::A deux fois : 1 1 type deref: at 0: can't access "frame:1:local": the procedure call that owned this variable has returned 1 type deref needs a typed value 1 wrong # args: should be "type deref value" 1 bad subcommand "zz": must be def, alias, call, canonic, cast, convert, debug, deref, eq, export, forget, get, include, is, literal, map, meta, ops, parse, proc, repeat, variant or binary