Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005668OCamlCamlp4public2012-07-04 17:492012-07-04 18:31
Reporterfrisch 
Assigned Todim 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.00.0+dev 
Summary0005668: Camlp4 produces invalid syntax for "let _ = ..."
DescriptionThe 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.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0007632)
dim (developer)
2012-07-04 18:30

Fixed. Commits 12656 and 12657.

- Issue History
Date Modified Username Field Change
2012-07-04 17:49 frisch New Issue
2012-07-04 18:30 dim Note Added: 0007632
2012-07-04 18:31 dim Assigned To => dim
2012-07-04 18:31 dim Status new => resolved
2012-07-04 18:31 dim Resolution open => fixed
2012-07-04 18:31 dim Fixed in Version => 4.00.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker