Artifact 182b3c4714f0f65da9bd9b1f1e4e474e13626173d3f61bdfc718f44c81d0012b:
- File typeparse/tests_tclsh/t80_lappend_contrat.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: 684) [annotate] [blame] [check-ins using]
boucle : 1000 {999 1.0} list<point> point copie : L={0.0 0.0} {1.0 1.0} M={0.0 0.0} refus : 1 expected floating-point number but got "a" ; L={0.0 0.0} {1.0 1.0} refus 2 : 1 point needs 2 values but got 3 plusieurs : {0.0 0.0} {1.0 1.0} {2.0 2.0} {3.0 3.0} 4 défaut absent : 1 pdef needs 2 values but got 1 ; D={1.0 2.0} compacte : {{0.5 1.5} {2.5 3.5} {4.5 5.5}} 1 1 {expected floating-point number but got "x"} {{0.5 1.5} {2.5 3.5} {4.5 5.5}} somme : 2.0 carré forme.cote forme.nom list.any : int string list(2) : 1 list(2)<point> needs exactly 2 elements but got 3 pendant foreach : 4 {{0.0 0.0} {1.0 1.0} {9.0 9.0} {9.0 9.0}} élément typé : 7.0 8.0 point chaîne : 49 1.0 1.0