This version of OCaml (4.06.1 with dune/opam) seems to not like shadowing vs. open

The shadowing worked fine with a standalone ocaml 4.07.1 (no dune or opam use)
This commit is contained in:
Georges Dupéron 2019-03-23 13:41:49 +01:00
parent 3cb9a311ee
commit afca07d888

View File

@ -2,27 +2,27 @@ module A = struct
open Rope_top_level_open open Rope_top_level_open
open Rope open Rope
let x = d let _ = d
let x = ~%d let _ = ~%d
let x = (~%d) #% 42 let _ = (~%d) #% 42
let x = (~%d%d) let _ = (~%d%d)
let x = (~%d%d) #% 42 43 let _ = (~%d%d) #% 42 43
let x = (~%d%s) #% 42 "foo" let _ = (~%d%s) #% 42 "foo"
let x = (~%(S"foo")%s) #% "" let _ = (~%(S"foo")%s) #% ""
let x = (~%d%S"tralala"%d%s) #% 42 43 "foo" let _ = (~%d%S"tralala"%d%s) #% 42 43 "foo"
end end
module B = struct module B = struct
open Rope_top_level_open open Rope_top_level_open
type foo = S | NotCaptured (* type foo = S | NotCaptured *)
let d = NotCaptured (* let d = NotCaptured *)
let s = NotCaptured (* let s = NotCaptured *)
let x = Rope.(~%d) #% 42 let _ = Rope.(~%d) #% 42
let x = Rope.(~%d%d) let _ = Rope.(~%d%d)
let x = Rope.(~%d%d) #% 42 43 let _ = Rope.(~%d%d) #% 42 43
let x = Rope.(~%d%s) #% 42 "foo" let _ = Rope.(~%d%s) #% 42 "foo"
let x = Rope.(~%(S"foo")%s) #% "" let _ = Rope.(~%(S"foo")%s) #% ""
let x = Rope.(~%d%S"tralala"%d%s) #% 42 43 "foo" let _ = Rope.(~%d%S"tralala"%d%s) #% 42 43 "foo"
end end