Loop/errors on tallying
This loops
let x : (Int -> Int) & ('b -> 'b) & (('a -> 'a) -> ('a -> 'a)) = fun (x : 'd ) : ('d) = x : ('d) ;;
This gives the wrong result
# let x : (('a -> 'a) -> ('a -> 'a)) & (Int -> Int) & ('d -> 'd) = fun (x : 'd ) : ('d) = x : ('d) ;; This expression should have type: 'd -> 'd but its inferred type is: (('a -> 'a) -> 'a -> 'a) & (Int -> Int) & ('d -> 'd)
while each separate intersection works:
# let x : (('a -> 'a) -> ('a -> 'a)) & (Int -> Int) = fun (x : 'd ) : ('d) = x : ('d) ;; val x : (Int -> Int) & (('a -> 'a) -> 'a -> 'a) = # let x : ('d -> 'd) = fun (x : 'd ) : ('d) = x : ('d) ;; val x : 'd -> 'd =