Commit 998cbe42 authored by POTTIER Francois's avatar POTTIER Francois

Fixed a bug in [rename_keyword_inner] where inlining would incorrectly rename

$startpos(x) in the callee if the callee itself happened to be called x.
parent 27757709
......@@ -2052,7 +2052,7 @@ let e1 =
( e )
in
let x =
let _startpos_x_ = _endpos__2_ in
let _startpos_x_ = _startpos_x0_ in
let _endpos = _startpos__4_ in
let x = x0 in
( x, KValue, (_startpos_x_, _endpos) )
......@@ -2664,7 +2664,7 @@ value_declaration:
( ty )
in
let x =
let _startpos_x_ = _endpos__1_ in
let _startpos_x_ = _startpos_x0_ in
let _endpos = _startpos__3_ in
let x = x0 in
( x, KValue, (_startpos_x_, _endpos) )
......
......@@ -100,7 +100,7 @@ let rename_keyword_outer
Position (subject', where', flavor)
let rename_keyword_inner
((psym, first_prod, last_prod) : keyword_renaming)
((_, first_prod, last_prod) : keyword_renaming)
phi
keyword : keyword =
match keyword with
......@@ -111,12 +111,7 @@ let rename_keyword_inner
| Left, WhereStart -> first_prod
| Left, WhereEnd -> last_prod
| RightNamed s, where ->
if s = psym then
match where with
| WhereStart -> first_prod
| WhereEnd -> last_prod
else
(* Otherwise, we just take the renaming into account. *)
(* Just take the renaming into account. *)
let s' = apply !phi s in
(RightNamed s', where)
in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment