typed-racket/typed-racket-test
Marc Burns 609d6189e9 Improve typecheck for private field initializers
This patch addresses two issues with `typed/racket/class`:

1. For multiple private fields declared with `define-values`, type
information does not propagate from the values produced by the
initialization expression to the declared fields. This breaks soundness
of private fields: A field can be annotated with a type that does not
contain the field's initial value.

This was resolved by keeping a table of temporary bindings introduced in
the expansion of the initializer along with their types. The field
setter's type is then checked against that of the corresponding
temporary.

2. The class body typechecker assumes that the `expr` of
a `define-values` clause will expand to a bare `(values vs ...)`.

This was resolved by generalizing the template for matching an expanded
`define-values` initializer and extracting the type information from the
`expr` instead of each element in `(vs ...)`.
2015-05-12 18:42:05 -04:00
..
fail Add srcloc instead of a quoted syntax for casts 2015-03-06 16:09:31 -05:00
gui/succeed Fix first-order check for TR's opaque object/c 2015-03-13 16:52:34 -04:00
optimizer Make tc-subst restrict returned types based on argument types. 2015-04-07 09:50:32 -07:00
performance Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
succeed Allow #lang typed/racket/gui and add base module 2015-03-12 17:27:59 -04:00
unit-tests Improve typecheck for private field initializers 2015-05-12 18:42:05 -04:00
xfail Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
info.rkt Increase with-tr-contracts.rkt timeout 2015-03-05 22:23:58 -05:00
LICENSE.txt Remove extra directories. 2014-12-02 00:53:36 -05:00
main.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
nightly-run.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
places.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
random-real.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
run.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
send-places.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
test-docs-complete.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
tr-random-testing.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
with-tr-contracts.rkt Fix more collection paths. 2014-12-18 09:30:17 -05:00