RosettaCodeData/Task/Copy-a-string/OCaml/copy-a-string-3.ml
2024-10-16 18:07:41 -07:00

4 lines
227 B
OCaml

(* Transition-period synonymy between types, explicit type annotations are just for emphasis *)
let dst1 : string = Bytes.copy (src : bytes)
let dst2 : bytes = Bytes.copy (src : string)
(* fails to compile with -safe-string *)