RosettaCodeData/Task/Copy-a-string/OCaml/copy-a-string-3.ocaml
2023-07-01 13:44:08 -04:00

4 lines
227 B
Text

(* 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 *)