Artifact 9fb517db75130152729a4f611ecc0da1d0281b5e9bc529d211dd1c98a9c71259:
- File typeparse/tests_tclsh/t55_cast_collection.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: 715) [annotate] [blame] [check-ins using]
foreach : 0.0,0.0 foreach : 3.0,4.0 lassign : 3.0 4.0 llength : 2 (le point seul : 2) dict : x=3.0 dict : y=4.0 dict for : centre=1.0 2.0 dict for : rayon=5.0 list : <{1.0 2.0} 5.0> list : {} {} list.any : <{1.0 2.0} 5.0> list<any> : point double list.double: <3.0 4.0> list<double> : {} {} list(2).int: refus : expected integer but got "3.0" dict.any : point somme : <3.0 4.0> list : {} {} poly : <{0.0 0.0} {3.0 4.0}> list<point> : point point poly nu : <{0.0 0.0} {3.0 4.0}> list : {} {} chaîne : 1 refus : expected integer but got "1.0 2.0" refus : list(3)<double> needs exactly 3 elements but got 2 refus : list(3)<point> needs exactly 3 elements but got 2 dans une procédure : 2