racket/collects/honu/examples/old/method-exp-sub.honu
Stevie Strickland 7dbb99d3c6 merged 292:296 from branches/sstrickl
svn: r297
2005-07-02 04:03:02 +00:00

27 lines
314 B
Plaintext

type t {
int x;
}
type t2 <: t {
int y;
}
type contains_t {
t x(t2);
}
class c() : t2 impl t2 {
init int x;
init int y;
export t2 : x, y;
}
class cct() : contains_t impl contains_t {
t2 x(t x) {
return new c : t2 (x = x.x, y = x.x);
}
export contains_t : x;
}