Commits

camlspotter committed 3893d8e

fix for exception in pattern

  • Participants
  • Parent commits 1f5fa72

Comments (0)

Files changed (2)

         | Tpat_var (id, {loc})
         | Tpat_alias (_, id, {loc}) 
           -> record loc (Str (AStr_value id))
-        | Tpat_construct (path, {loc}, _, _, _) -> 
-            record loc (Use (Kind.Type, path))
+        | Tpat_construct (path, {loc}, cdesc, _, _) -> 
+            let kind = match cdesc.Types.cstr_tag with
+              | Types.Cstr_exception _ -> Kind.Exception            
+              | _ -> Kind.Type
+            in
+            record loc (Use (kind, path))
         | Tpat_record (lst , _) ->
             List.iter (fun (path, {loc}, _, _) -> 
               record loc (Use (Kind.Type, path))) lst

File tests/Makefile.targets

 signature2.cmi \
 subpath.cmo \
 target.cmo \
+target_e.cmo \
 test.cmo \
 test1.cmo \
 test10.cmo \