This gives a type mismatch:

    yyy := {+ i:int };
    zzz := {+ j:int };
    uuu := zzz or yyy or null ;
    bbb := yyy(1);
    ccc := uuu(bbb);
    fff(k:uuu):int := when k is yyy do 1 is zzz do 2 is null do 3;

    f():int := (
	 when ccc
	 is yyy do return 1
	 is zzz do return 2
	 is null do return 3;
	 );

It seems that "when" should do the same thing "if" does, and report whether all of its branches return.




