Skip to content

Definition context conflict logic is overly conservative #345

Open
@jackfirth

Description

@jackfirth

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexisting lintIssues or pull requests relating to existing lints

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions