racket / typed-racket

Typed Racket
Other
521 stars 104 forks source link

Can't use #:property to seal a Typed Racket structs #1376

Open shawnw opened 4 months ago

shawnw commented 4 months ago

The Typed Racket struct doesn't support #:sealed, but it does have #:property, so I figured you could just use prop:sealed instead. But:

$ racket -I typed/racket
Welcome to Racket v8.13 [cs].
> (struct foo ([bar : Integer]) #:property prop:sealed #t)
string:1:41: Type Checker: missing type for identifier;
 The `racket' language does not seem to have a type for this identifier; please file a bug report
  identifier: prop:sealed
  from module: (lib typed/racket)
  in: prop:sealed
 [,bt for context]

Oddly, DrRacket gives a different, much less useful, error than the command line repl:

Type Checker: expected a struct type property but got Nothing in: #t

Another thing that isn't imported properly into TR?