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

4.03: inconsistent printing and parsing of inline records #6615

Closed
vicuna opened this Issue Oct 16, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

vicuna commented Oct 16, 2014

Original bug ID: 6615
Reporter: ggole
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2016-12-07T10:36:50Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @gasche @hcarty

Bug description

The syntax of inline records doesn't seem allow a trailing ; as in normal records, that produces a parse error. However, inline records are printed with exactly such a trailing ;.

In short:

# type t = T of { f : float; };;
Characters 27-28:
  type t = T of { f : float; };;
			 ^
Error: Syntax error
# type t = T of { f : float };;
type t = T of { f : float; }

Hopefully the trailing ; will be allowed. It would be pretty surprising if the syntax were different to regular records.

Steps to reproduce

Enter

type t = T of { f : float };;

into a 4.03 toplevel.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Oct 17, 2014

Comment author: @garrigue

Fixed in trunk at revision 15559

@vicuna vicuna closed this Dec 7, 2016

@vicuna vicuna added the bug label Mar 20, 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.