1. HongboZhang
  2. ocaml

Commits

xleroy  committed 9470de5

Nouvelle rectif de array_kind pour faire face aux abreviations non expansables.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@169f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

  • Participants
  • Parent commits 55f6aed
  • Branches master

Comments (0)

Files changed (1)

File bytecomp/translcore.ml

View file
  • Ignore whitespace
 
 let array_kind arg =
   match Ctype.repr arg.exp_type with
-    Tconstr(p, [ty]) ->
+    Tconstr(p, [ty]) when Path.same p Predef.path_array ->
       begin match Ctype.repr ty with
         Tvar v -> Pgenarray
       | Tconstr(p, _) ->
             Paddrarray
       | _ -> Paddrarray
       end
-  | _ -> Pgenarray (* This can happen with abbreviations taht we can't expand
+  | _ -> Pgenarray (* This can happen with abbreviations that we can't expand
                       here because the typing environment is lost *)
 
 let transl_prim prim args =