Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong printing of method specifications #4928

Closed
vicuna opened this Issue Nov 25, 2009 · 1 comment

Comments

Projects
None yet
1 participant
@vicuna
Copy link
Collaborator

vicuna commented Nov 25, 2009

Original bug ID: 4928
Reporter: @ygrek
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.11.1
Fixed in version: 3.12.1+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: hnrgrgr zack

Bug description

Printers.OCaml.print_implem adds ;; after each method specification. This is not a valid OCaml syntax.

-pp camlp4o accepts such syntax. Probably this is another bug.

Additional information

$ cat q.ml
open Camlp4.PreCast
let _loc = Loc.mk ""
let make s = <:str_item< class $lid:s$ = object method name = $str:s$ end >>
let () = Printers.OCaml.print_implem (make "hello")

$ ocaml dynlink.cma camlp4of.cma -init q.ml
Objective Caml version 3.11.1

Camlp4 Parsing version 3.11.1

class hello = object method name = "hello";; end;;

File attachments

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Sep 2, 2010

Comment author: @ygrek

Please apply the patch, still the case in 3.12.0 :

    Objective Caml version 3.12.0

Camlp4 Parsing version 3.12.0

class hello = object method name = "hello";; end;;

@vicuna vicuna closed this Sep 25, 2012

@vicuna vicuna added camlp4 bug labels Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.