(* * OK, here's a real simple test to see if the current formal type rule that * says in effect we get automatic injection is implemented. F'ing "A", it * is!! How the f did that happen?? OK, I see, it's in the typechk.c:orCompat * function. *) obj IorS = integer or string; obj SomeOtherType; op main(ios:IorS, x:SomeOtherType) = ( ios = 1; -- a legal injection ios = "xyz"; -- also a legal injection ios = x; -- ERROR; illegal by normal type checking rules ); (* * OK, let's try the way-old style Sex type. *) -- obj Sex is "Male" or "Female"; -- This doesn't work yet, but searching for -- 19oct99 in the parser will show you how -- it can. obj Sex = Male or Female; obj Male = "male"; obj Female = "female"; op main2(s:Sex) = ( s = "male"; -- should be OK s = "female"; -- ditto s = "some other string value"; -- ERROR s = 1; -- ERROR );