summaryrefslogtreecommitdiffstats
path: root/testsuite/tests/typing-misc/occur_check.ml.reference
blob: 865c7d6441929df78e33753ab5de29944a2fce9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

#     type 'a t = 'a
# Characters 42-43:
  let f (g : 'a list -> 'a t -> 'a) s = g s s;;
                                            ^
Error: This expression has type 'a list
       but an expression was expected of type 'a t = 'a
       The type variable 'a occurs inside 'a list
# Characters 42-43:
  let f (g : 'a * 'b -> 'a t -> 'a) s = g s s;;
                                            ^
Error: This expression has type 'a * 'b
       but an expression was expected of type 'a t = 'a
       The type variable 'a occurs inside 'a * 'b
#