# this used to cause a loop in interfaces code # because enumeration literals point back to type. resource e1 op f(cap e1 x) type color = enum (red,blue) op g(color shady) body e1() proc f(x) { write( "in f" ) x.g(red); x.g(blue) write( "out f" ) } proc g(shady) { if (shady == blue) { write( "blue" ) } else if (shady == red ) { write( "red" ) } else { write( "oops" ) } } end resource e2 import e1 body e2() cap e1 c c = create e1() c.f(c) write( "done" ) end