1open Swig 2open Director_unroll 3 4let director_unroll_MyFoo ob meth args = 5 match meth with 6 | "ping" -> C_string "MyFoo::ping()" 7 | _ -> (invoke ob) meth args 8 9let a = new_derived_object 10 new_Foo (director_unroll_MyFoo) '() 11 12let b = new_Bar '() 13let _ = b -> set (a) 14let c = b -> get () 15let _ = assert ((a -> "&" () as int) = (c -> "&" () as int)) 16