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

FreeVars module treats a record field name as a variable. #6334

Closed
vicuna opened this issue Mar 3, 2014 · 2 comments
Closed

FreeVars module treats a record field name as a variable. #6334

vicuna opened this issue Mar 3, 2014 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Mar 3, 2014

Original bug ID: 6334
Reporter: sowa
Assigned to: @diml
Status: closed (set by @diml on 2014-03-04T10:09:35Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.01.0
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues

Bug description

Camlp4.Struct.FreeVars module treats a record field name as a variable name.
For example, FreeVars reports that <:expr<r.name>> has free variables "r" and "name"; <:expr> has free variable "r".

Steps to reproduce

$ ocaml -I +camlp4
OCaml version 4.01.0

#load "dynlink.cma";;

#load "camlp4orf.cma";;

Camlp4 Parsing version 4.01.0

open Camlp4.PreCast;;

let _loc = Loc.ghost;;

val _loc : Camlp4.PreCast.Loc.t =

let fv e = let module FV = Camlp4.Struct.FreeVars.Make(Ast) in FV.S.elements (FV.free_vars FV.S.empty e);;

val fv : Camlp4.PreCast.Ast.expr -> string list =

fv <:expr<r.name>>;;

  • : string list = ["name"; "r"]
@vicuna
Copy link
Author

vicuna commented Mar 3, 2014

Comment author: @diml

Could you please move this ticket to https://github.com/ocaml/camlp4?

Thanks

@vicuna
Copy link
Author

vicuna commented Mar 4, 2014

Comment author: sowa

Moved this issue to https://github.com/ocaml/camlp4.

@vicuna vicuna closed this as completed Mar 4, 2014
@vicuna vicuna added the camlp4 label Mar 14, 2019
@vicuna vicuna assigned ghost Mar 14, 2019
@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
Projects
None yet
Development

No branches or pull requests

1 participant