#:object for function types seems to be ignored
Open
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 575
- Forks
- 106
- Avg merge
- 2h 1m
- Merged PRs (30d)
- 2
Description
What version of Racket are you using?
6.9.0.4
What program did you run?
#lang typed/racket
(: f (Any → (U String #f)
:
#:+ String
#:- (! String)
#:object unbound)) ;;;;;;;;;;;;;;;;;;;;;;;; Look here
(define (f x) (if (string? x) x #f))
What should have happened?
The #:object option should be taken into account, but it seems to have no effect. I can specify an unbound identifier, a random number, even a literal #hash() table (which seems like an invalid object specification), but they have no effect whatsoever.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied #lang typed/racket example on Racket 6.9.0.4 and trace how the function type’s #:object option is processed. Compare valid and invalid object specifications, then add coverage showing that the option is no longer silently ignored.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100