Artifact a56ed81740aa935af091c2529c79ae1cb20bf921a559974322e57feef0b889bd:
- File typeparse/tests_tclsh/t98_depliage.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]
{*} liste: {0 5.0} 2 {} {} 0 5.0 {**} dict: {x 0.0 y 5.0} 5.0 {} sans dépliage: {0.0 5.0} 2 point rect {*}: {{0.0 0.0} {10.0 10.0}} 10.0 {} rect {**}: {nw {x 0.0 y 0.0} se {x 10.0 y 10.0}} 10.0 list.point: {{1.0 2.0} {3.0 4.0}} {{x 1.0 y 2.0} {x 3.0 y 4.0}} 2 somme {*}: {1.0 2.0} aucune somme {**}: {en {x 1.0 y 2.0}} aucune mauvais retour: ERREUR return value {point}: expected floating-point number but got "a" type {{*}T}: {1.0 2.0} 2 {x 1.0 y 2.0} {} type {{*}T} liste: {{1.0 2.0} {3.0 4.0}} {nw {x 1.0 y 2.0} se {x 3.0 y 4.0}} type {{*}T} erreur: ERREUR expected floating-point number but got "a" type proc: {{*}point} {{**}point} type inconnu: ERREUR bad return type {zz}: unknown type "zz" compact: {1.0 2.0 3.0} {} {1.0 2.0 3.0} déjà typé: {3.0 4.0} 2 {}