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
The following code, taken from pa_js.ml in js_of_ocaml, creates a fragment which produces a syntax error (when Camlp4 prints the AST as source code):
let constr =
let y = random_var () in
let body =
let o = <:expr< $lid:y$ >> in
let _loc = m_loc in <:expr< ($o$#$m$ : $m_typ$) >>
in
<:expr< fun ($lid:y$ : $obj_type$) -> $body$ >>
in
<:expr< let $lid:x$ = $obj$ in
let _ = $constr$ in
$f x$ >>
The pre-processed code looks like:
let _ (foo : 'a) = ...
which is not valid OCaml syntax.
The text was updated successfully, but these errors were encountered:
Original bug ID: 5668
Reporter: @alainfrisch
Assigned to: @diml
Status: closed (set by @xavierleroy on 2015-12-11T18:07:05Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.00.0+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Bug description
The following code, taken from pa_js.ml in js_of_ocaml, creates a fragment which produces a syntax error (when Camlp4 prints the AST as source code):
The pre-processed code looks like:
let _ (foo : 'a) = ...
which is not valid OCaml syntax.
The text was updated successfully, but these errors were encountered: