summaryrefslogtreecommitdiff
path: root/testsuite/tests/ppx-attributes/inline.ml
blob: 18fc3a6587fbef6f69b7fa558dbcbb436d4a4f27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(* TEST
 flags = "-dlambda -dno-unique-ids";
 expect;
*)

(* This checks that function attributes like [@inline] aren't dropped when they
   end up on a Texp_newtype node in the exp_extra field. *)

let f = fun [@inline] (type a) (x : a) -> x
[%%expect{|
(let (f = (function x always_inline x))
  (apply (field_mut 1 (global Toploop!)) "f" f))
val f : 'a -> 'a = <fun>
|}]