racket / racket/typed-racket

Class typechecker should handle private field names correctly

Open
#830 0 comments 0 reactions 1 assignee View on GitHub

@takikawa is already working on this.

Since Jun 16, 2019.

Dominant language
Racket
Stars
575
Forks
106
Avg merge
2h 1m
Merged PRs (30d)
2

Description

The following bug is caused by the class typechecker handling names wrong for private fields in certain cases (basically more things need to be handled with free id tables).

What version of Racket are you using?

v7.3.0.3

What program did you run?
#lang typed/racket

(define-syntax-rule (mkro)
  (begin (: x String) (define x "foo") (string-append x "bar")))

(class object%
  (super-new)
  (mkro)
  (: x Integer)
  (define x 3))
What should have happened?

No error

If you got an error message, please include it here.

Error:

match: no matching clause for Nothing
  location...:
   ...t/racket-git/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt:1144:2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.