User-defined Types
var YType := class Value { var dynamic type;
var init := method [ t ] { type:= t ; return this};
var check := method t {return type <= t.getType[]}; };
var Persons := class Value {var msg := "I am a person.\n"};
var Staff := class Persons {var msg := "I am a staff.\n"};
var YStaff := new YType[Staff];
var s:YStaff; // Upwards-closure type
s := new Persons; print s.msg;
var p:Staff; // Normal type requires exact match.
p := new Persons; print s.msg;