resyntax icon indicating copy to clipboard operation
resyntax copied to clipboard

Definition context conflict logic is overly conservative

Open jackfirth opened this issue 1 year ago • 0 comments

This test should pass:

#lang resyntax/private/refactoring-test
require: resyntax/default-recommendations let-binding-suggestions

header:
- #lang racket/base

test: "shadowed bindings in parent definition contexts don't prevent let-to-define refactoring"
--------------------
(define (f)
  (define x 1)
  (define (g)
    (let ([x 1])
      x))
  g)
--------------------
--------------------
(define (f)
  (define x 1)
  (define (g)
    (define x 1)
    x)
  g)
--------------------

But instead, Resyntax leaves the code unchanged. This is probably related to the changes in #344.

jackfirth avatar Oct 02 '24 18:10 jackfirth