You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 2458 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Hi,
an example that produces the compiler bug in 3.07+2 on Linux is:
class bug = object
method my_array= [|0;0;0;10;-1;-2|]
end;;
when Path.same p Predef.path_array ->
array_element_kind env elt_ty
| _ ->
(* This can happen with e.g. Obj.field *)
Aux developpeurs: la correction est simple mais sale.
Le probleme est du a` la coercion de ty vers Tpoly(ty,vars) dans les
methodes, qui se fait sans introduction de nouveau noeud dans l'arbre
syntaxique.
Les autres alternatives sont:
ajouter un noeud Texp_constraint lorsqu'on change le type.
mais il faut se le taper dans tout le compilo.
utiliser une pseudo application d'une fonction definie comme %ident.
Mais il me semble que cette application sera eliminer trop tard, et
que ca conduirait a un code moins efficace. A l'heure actuelle les optimisations liees au typage sont tres
limitees, donc le quick hack ci-dessus suffit, mais a` long term la
question se pose.
Original bug ID: 2458
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hi,
an example that produces the compiler bug in 3.07+2 on Linux is:
class bug = object
method my_array= [|0;0;0;10;-1;-2|]
end;;
this renders a:
$> ocamlc -c bug.ml
Fatal error: exception Assert_failure("bytecomp/translcore.ml",612,14)
$>
have fun,
Romain Slootmaekers
--------------- Original post follows below -------------------------
Hi,
when I try to compile my ocaml program under Linux (Mandrake) with Ocaml
3.07+2 I get an assertion failure in the compiler:
Fatal error: exception Assert_failure("bytecomp/translcore.ml",612,14)
The same program compiles and works fine under Ocaml 3.06 (cygwin)
I couldn't find anything similar on the bug web site
(http://caml.inria.fr/bin/caml-bugs) But I didn't venture deeply into
the french bug reports ;)
I can provide a code sample that produces this on demand.
So my question is:
is it something known, or something new ?
and if so, is there a workaround ?
TIA,
Romain Slootmaekers
The text was updated successfully, but these errors were encountered: