Permalink
Browse files

[fix] slicer,both,protected: both value can use a protected value if …

…it is also exposed (as before)
  • Loading branch information...
1 parent 740ded7 commit 3dd938c1fe0751b214b9b0b893b4017a21e08f84 @OpaOnWindowsNow OpaOnWindowsNow committed Mar 26, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 qmlslicer/qmlSimpleSlicer.ml
@@ -842,14 +842,15 @@ let check_side ~emit_error ~emit node =
~tagged:"server" ~use:"protected" Private_path
"The directive will be ignored.";
| Some {wish=Force; side=(Client|Both) as side} ->
- if emit || emit_error then (
+ let c1 = side=Client || (match node.privacy with Published _ -> true | _ -> false) in
+ if not(c1) && (emit || emit_error) then (
OManager.serror "@[<v>%a@]@\n@[<4> %s is tagged as '%s' but it uses 'protected' values:@\n%a@]"
pp_pos node
(Ident.original_name node.ident)
(side_str side)
(pp_private_path pp_pos) node;
- false
- ) else true
+ c1
+ ) else c1
| _ -> true
) else true
in

0 comments on commit 3dd938c

Please sign in to comment.