Skip to content

Class name and its method names diagnosed as unbound variables #105

@madkins23

Description

@madkins23

For the following file:

#lang racket/base

(require racket/class)

(define test%
  (class object%
    (define/public (testes)
      (displayln "not funny"))))

the class name test% and method name testes (sorry, inappropriate humor) show as unused variables:

small-class

The attached log of communication between the magic-racket plugin and the racket-langserver LSP show this coming from the LSP. Search for the second textDocument/publishDiagnostics message from server to client-1.

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.2 LTS
Release:	22.04
Codename:	jammy
$ raco pkg show
Installation-wide:
 Package            Checksum             Source
 main-distribution  5a53b6db4ffcbdd4...  catalog...tribution
 racket-lib         9347cf1b6f832640...  catalog racket-lib
 [202 auto-installed packages not shown]
User-specific for installation "8.9":
 Package            Checksum             Source
 racket-langserver  570b19570db40647...  catalog...erver.git
 try-catch-finally  ae71f04fe3ef793e...  catalog...h-finally
 [7 auto-installed packages not shown]

I also tried running the plugin against a local fork of the racket-langserver code and got the same thing. I may dig into the code and see what I can figure out, but not immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions