[ocaml] [scala] fix resolve function