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: 539 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
The following code produces the wrong output, and also crashes ocamlrun. Slight
modifications do not produce the bug.
type type_expr = [
| TTuple of type_expr list | TConstr of type_expr list
| TVar of string | TVariant of string list
| TBlock of int | TCopy of type_expr
]
and recurs_type_expr = [
| TTuple of type_expr list | TConstr of type_expr list
| `TVariant of string list
]
let rec copyit te =
match te with
| TCopy te -> te | TVar _ -> te
| `TBlock _ -> te
| #recurs_type_expr as desc ->
Printf.printf "should not be here";
flush stdout;
let te =
(match desc with
`TTuple tl ->
`TTuple (List.map copyit tl)
| `TConstr tl ->
`TConstr (List.map (copyit) tl)
| `TVariant (row) ->
`TVariant (row)
)
in
te
let _ = copyit (`TVar "Test")
The text was updated successfully, but these errors were encountered:
The following code produces the wrong output, and also crashes ocamlrun. Slight
modifications do not produce the bug.
type type_expr = [
| TTuple of type_expr list | TConstr of type_expr list
| TVar of string | TVariant of string list
| TBlock of int | TCopy of type_expr
]
and recurs_type_expr = [
| TTuple of type_expr list | TConstr of type_expr list
| `TVariant of string list
]
let rec copyit te =
match te with
| TCopy te -> te | TVar _ -> te
| `TBlock _ -> te
| #recurs_type_expr as desc ->
Printf.printf "should not be here";
flush stdout;
let te =
(match desc with TTuple tl -> TTuple (List.map copyit tl)
| TConstr tl -> TConstr (List.map (copyit) tl)
| TVariant (row) -> TVariant (row)
)
in
te
let _ = copyit (`TVar "Test")
This is a bug (not limited to W2k) and I am working on it.
Thank you for having reported the bug.
Original bug ID: 539
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Manuel Fahndrich
Version: 3.02
OS: W2K
Submission from: atoms.research.microsoft.com (131.107.65.127)
The following code produces the wrong output, and also crashes ocamlrun. Slight
modifications do not produce the bug.
type type_expr = [
|
TTuple of type_expr list |
TConstr of type_expr list|
TVar of string |
TVariant of string list|
TBlock of int |
TCopy of type_expr]
and recurs_type_expr = [
|
TTuple of type_expr list |
TConstr of type_expr list| `TVariant of string list
]
let rec copyit te =
match te with
|
TCopy te -> te |
TVar _ -> te| `TBlock _ -> te
| #recurs_type_expr as desc ->
let _ = copyit (`TVar "Test")
The text was updated successfully, but these errors were encountered: