1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
(* Additional shadowing tests, to make sure the [@@deprecated] attributes are properly
transported in [Base] *)
open Base
let () = seek_in stdin 0
[%%expect
{|
Line _, characters _-_:
Error (alert deprecated): Base.seek_in
[2016-09] this element comes from the stdlib distributed with OCaml.
Use [Stdio.In_channel.seek] instead.
Line _, characters _-_:
Error (alert deprecated): Base.stdin
[2016-09] this element comes from the stdlib distributed with OCaml.
Use [Stdio.stdin] instead.
|}]
let (_ : _) = StringLabels.make 10 'x'
[%%expect
{|
Line _, characters _-_:
Error (alert deprecated): module Base.StringLabels
[2016-09] this element comes from the stdlib distributed with OCaml.
Referring to the stdlib directly is discouraged by Base. You should either
use the equivalent functionality offered by Base, or if you really want to
refer to the stdlib, use Stdlib.StringLabels instead
|}]
let _ = ( == )
[%%expect
{|
Line _, characters _-_:
Error (alert deprecated): Base.==
[2016-09] this element comes from the stdlib distributed with OCaml.
Use [phys_equal] instead.
|}]
let _ = ( != )
[%%expect
{|
Line _, characters _-_:
Error (alert deprecated): Base.!=
[2016-09] this element comes from the stdlib distributed with OCaml.
Use [not (phys_equal ...)] instead.
|}]
|