summaryrefslogtreecommitdiffstats
path: root/testsuite/tests/typing-typeparam/newtype.ml.reference
blob: 217697531f1e453aff8af58aebd891fb69a31184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

#       val property : unit -> ('a -> exn) * (exn -> 'a option) = <fun>
#                         false
true
true
false
#         val sort_uniq : ('a -> 'a -> int) -> 'a list -> 'a list = <fun>
#       abc,xyz
#   Characters 33-34:
  let f x (type a) (y : a) = (x = y);; (* Fails *)
                                  ^
Error: This expression has type a but an expression was expected of type 'a
       The type constructor a would escape its scope
#       Characters 117-118:
    method n : 'a -> 'a = fun (type g) (x:g) -> self#m x
                                                       ^
Error: This expression has type g but an expression was expected of type 'a
       The type constructor g would escape its scope
#