Question: Why is this type assertion not invalid?

If I understand right, in the following calling an exception should be raised since the return value of the matching coercion procedure is of course not of type “set”: 

restart;
foo := (x::coerce(set, (y::rtable) -> convert(y, list))) -> x:
foo(<0>);
 = 
                              [0]

Did I miss something?

Please Wait...