resource a
	op f(int x)
	type foo = rec(int a; int b)
	op g(foo z)
end

resource b
	op h(int x)
	extend a
	op i(foo x)   # a is known since implicitly imported
	import a        # unneded, but should cause no problem
	op j(foo v)
body b()
	int  x = 789; foo  y
	y.a = 17; y.b = 86; f(12345); g(y); h(6543); i(y); j(foo(12,34))
	proc f(x) { write("hi from f",x) }
	proc g(z) { write("hi from g",-x,y.a, y.b,z.a,z.b) }
	proc h(y) { write("hi from h",x,y) }
	proc i(z) { write("hi from i",-x,y.a,y.b,z.a,z.b) }
	proc j(t) { write("hi from j",x,y.a,y.b,t.a,t.b) }
end
