summaryrefslogtreecommitdiff
path: root/typing/typetexp.ml
diff options
context:
space:
mode:
authoralainfrisch <alain@frisch.fr>2017-07-18 11:38:44 +0200
committeralainfrisch <alain@frisch.fr>2017-09-12 00:36:46 +0200
commit8034e2605671aefe7a0abe24b3c69398057d5423 (patch)
treee46afc12244ddf0ee5af911577e1e0ce7f8a0e38 /typing/typetexp.ml
parent98329668aed759e4e895fa13af7efea1710716de (diff)
downloadocaml-8034e2605671aefe7a0abe24b3c69398057d5423.tar.gz
Continue.
Diffstat (limited to 'typing/typetexp.ml')
-rw-r--r--typing/typetexp.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/typing/typetexp.ml b/typing/typetexp.ml
index cfdecd14ab..a09238b3e8 100644
--- a/typing/typetexp.ml
+++ b/typing/typetexp.ml
@@ -522,7 +522,10 @@ and transl_type_aux env policy styp =
let add_field = function
Rtag (l, attrs, c, stl) ->
name := None;
- let tl = List.map (transl_type env policy) stl in
+ let tl =
+ Builtin_attributes.warning_scope attrs
+ (fun () -> List.map (transl_type env policy) stl)
+ in
let f = match present with
Some present when not (List.mem l.txt present) ->
let ty_tl = List.map (fun cty -> cty.ctyp_type) tl in
@@ -667,7 +670,10 @@ and transl_fields env policy o fields =
Hashtbl.add hfields l ty in
let add_field = function
| Otag (s, a, ty1) -> begin
- let ty1 = transl_poly_type env policy ty1 in
+ let ty1 =
+ Builtin_attributes.warning_scope a
+ (fun () -> transl_poly_type env policy ty1)
+ in
let field = OTtag (s, a, ty1) in
add_typed_field ty1.ctyp_loc s.txt ty1.ctyp_type;
field