typed-racket/typed-racket-test/unit-tests
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
..
all-tests.rkt Add typechecking for prefab structs 2015-03-10 15:14:51 -04:00
check-below-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
class-tests.rkt Improve typecheck for private field initializers 2015-05-12 18:42:05 -04:00
class-util-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
contract-tests.rkt Handle more cases for opt-arg function contracts 2015-03-17 15:52:21 -04:00
evaluator.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
filter-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
generalize-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
infer-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
init-env-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
interactive-tests.rkt Add filters for trivial cases in arithemetic procedures. 2015-05-02 08:26:50 -07:00
keyword-expansion-test.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
metafunction-tests.rkt Make tc-subst restrict returned types based on argument types. 2015-04-07 09:50:32 -07:00
parse-type-tests.rkt Add typechecking for prefab structs 2015-03-10 15:14:51 -04:00
prefab-tests.rkt Add typechecking for prefab structs 2015-03-10 15:14:51 -04:00
prims-tests.rkt Adjust error messages for : annotation form 2015-04-21 16:07:13 -04:00
remove-intersect-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
rep-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
special-env-typecheck-tests.rkt Add support for use-dir? param of in-directory 2015-01-31 09:34:01 -05:00
static-contract-conversion-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
static-contract-optimizer-tests.rkt Use absent in some row poly class contracts 2015-03-04 16:26:35 -05:00
subst-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
subtype-tests.rkt Make subtype work with restricted filters. 2015-04-05 19:07:12 -07:00
test-utils.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
tooltip-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
type-alias-helper.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
type-equal-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
type-printer-tests.rkt Reduce directory nesting for tests. 2014-12-16 10:07:25 -05:00
typecheck-tests.rkt Add filters for trivial cases in arithemetic procedures. 2015-05-02 08:26:50 -07:00