Skip to content

Weird syntax accepted by OCaml #5936

@vicuna

Description

@vicuna

Original bug ID: 5936
Reporter: @alainfrisch
Assigned to: @damiendoligez
Status: assigned (set by @damiendoligez on 2017-02-24T15:35:17Z)
Resolution: open
Priority: low
Severity: minor
Category: lexing and parsing
Related to: #5939 #5983 #6173 #6961
Monitored by: @nojb @Drup @gasche @hcarty @yakobowski

Bug description

I'm surprised that the following syntax is accepted:

let id x = x in
(- id 10)

(and parsed as (- (id 10)).

Same with + instead of -.

File attachments

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions