Commits

camlspotter  committed 6bab151

test update

  • Participants
  • Parent commits 8e602a3
  • Branches 4.01.0.2.2.0

Comments (0)

Files changed (3)

     record loc0 (Type (exp_type, exp_env, `Expr popt)); (* `Expr is required? *)
     List.iter (fun (eextra, _loc) -> exp_extra eextra) eextras;
     match exp_desc with
-    | Texp_ident (p, {loc}, _) -> 
-        record_use loc Kind.Value p
+    | Texp_ident (p, {loc=_loc}, _) -> 
+        (* CamlP4 has a bug: if p = X.x, loc only points to x. So we use loc0 instead of loc 
+           PR#6170 *)
+        record_use loc0 Kind.Value p
     | Texp_constant _constant -> ()
     | Texp_let (_rec_flag, pes, expr) -> 
         pat_expr_list pes;

File tests/camlp4_path.ml

+(* See ocamlc_path.ml *)
 module X = struct
   let (* x => *) x (* <= x *) = 1
+
+  type t = (* Foo => *) Foo  (* <= Foo *)
 end
 
-let _ = X.(* ? x *)x
+let _ = X.(* ? x *)x (* ? x *)
+
+
+let _ = function
+  | X.(* ? Foo *)Foo (* ? Foo *) -> ()

File tests/ocamlc_path.ml

+(* See camlp4_path.ml *)
 module X = struct
   let (* x => *) x (* <= x *) = 1
 end
 
-let _ = X.(* ? x *)x
+let _ = X.(* ? x *)x (* ? x *)