rust/src/test/compile-fail
Tim Chevalier 1c786bcc82 Initialize all constraints to False
Previously, typestate was initializing the init constraint for
a declared-but-not-initialized variable (like x in "let x;") to False,
but other constraints to Don't-know. This led to over-lenient results
when a variable was used before declaration (see the included test
case). Now, everything gets initialized to False in the prestate/poststate-
finding phase, and Don't-know should only be used in pre/postconditions.

This aspect of the algorithm really needs formalization (just on paper),
but for now, this closes #700
2011-08-05 15:25:52 -07:00
..
alias-mismatch.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
aliasness-mismatch.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
alt-join.rs Initialize all constraints to False 2011-08-05 15:25:52 -07:00
alt-tag-nullary.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
alt-tag-unary.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
and-init.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
anon-obj-overriding-wrong-type.rs Disallow overloading a method with one of different type. Closes #703. 2011-07-29 13:44:34 -07:00
arg-count-mismatch.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
arg-type-mismatch.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
assign-alias.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
attr-bad-crate-attr.rc Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
attr-bad-meta.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
attr-before-stmt.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
attr-before-view-item2.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
attr-before-view-item.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
attr-dangling-in-fn.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
attr-dangling-in-mod.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
auto-deref-bind.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-alt.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
bad-bang-ann-2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-bang-ann-3.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-bang-ann.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-env-capture2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-env-capture3.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-env-capture.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-expr-path2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-expr-path.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-main.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
bad-module.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-name.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
bad-record-pat-2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-record-pat.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-recv.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-send.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
bad-type-env-capture.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
bang-tailexpr.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
binop-add-tup-assign.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
binop-add-tup.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
binop-bitxor-str.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
binop-logic-float.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
binop-logic-int.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
binop-mul-bool.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
binop-shift-port.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
binop-sub-obj.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
binop-typeck.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
block-coerce-no.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
block-copy.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
block-uninit.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
bogus-tag.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
break-outside-loop.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
break-uninit2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
break-uninit.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
capture1.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
chan-parameterized-args.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
constrained-type-missing-check.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
constructor-as-cast.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
copy-a-resource.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
cross-crate-glob-collision.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
dead-code-be.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
dead-code-ret.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
direct-obj-fn-call.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
do-while-constraints.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
do-while-pred-constraints.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
does-nothing.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
dup-link-name.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
duplicate-name.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
export2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
export-fully-qualified.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
export-import.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
export-no-tag-variants.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
export-tag-variant.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
export.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
ext-after-attrib.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
ext-noname.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
ext-nonexistent.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
extend-non-object.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
extenv-no-args.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
extenv-not-string-literal.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
extenv-too-many-args.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
extfmt-missing-type.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
extfmt-no-args.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
extfmt-non-literal2.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
extfmt-non-literal.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
extfmt-not-enough-args.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
extfmt-too-many-args.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
extfmt-unknown-type.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
extfmt-unsigned-plus.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
extfmt-unsigned-space.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
extfmt-unterminated-conv.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
fail-expr.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
fail-simple.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
fail-type-err.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
fn-as-iter.rs Do a bunch more typechecking for iters and for each loops. 2011-08-03 11:07:53 -07:00
fn-bad-block-type.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
fn-compare-mismatch.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
fn-constraint.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
fn-expr-type-state.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
fn-expr-typestate-2.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
for-each-over-bs.rs Do a bunch more typechecking for iters and for each loops. 2011-08-03 11:07:53 -07:00
for-loop-decl.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
forgot-ret.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
fru-extra-field.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
fru-typestate.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
if-branch-types.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
if-check-precond-fail.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
if-typeck.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
import2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
import3.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
import4.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
import5.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
import-glob-0.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
import-glob-circular.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
import-glob-export.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
import-glob-multiple.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
import-loop-2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
import-loop.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
import.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
impure-pred.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
infinite-tag-type-recursion.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
infinite-vec-type-recursion.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
item-name-overload.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
iter-as-fn.rs Do a bunch more typechecking for iters and for each loops. 2011-08-03 11:07:53 -07:00
lambda-mutate-nested.rs Prohibit assignment to upvars in lambdas. Closes #805. 2011-08-04 19:35:44 -07:00
lambda-mutate.rs Prohibit assignment to upvars in lambdas. Closes #805. 2011-08-04 19:35:44 -07:00
let-destruct-refutable.rs Add tests for destructuring locals 2011-08-01 17:52:43 +02:00
macro-2.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
macro.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
main-wrong-type-2.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
main-wrong-type.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
missing-main.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
missing-return2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
missing-return.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
multiline-comment-line-tracking.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
native-type-mismatch.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
nested-ty-params.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
no-constraint-prop.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
no-self-dispatch.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
not-a-pred-2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
not-a-pred-3.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
not-a-pred-check.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
not-a-pred.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
not-pred-args.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
occurs-check-2.rs Implement the occurs check 2011-08-04 15:30:09 -07:00
occurs-check.rs Implement the occurs check 2011-08-04 15:30:09 -07:00
or-init.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
or-patter-mismatch.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
output-type-mismatch.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
pattern-tyvar-2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
pattern-tyvar.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
pred-assign.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
pred-not-bool.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
pred-on-wrong-slots.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
pred-swap.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
put-in-fn.rs Actually un-xfail the test for put in fns. 2011-08-03 11:59:11 -07:00
rec-extend.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
rec-missing-fields.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
ret-non-nil.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
return-uninit.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
self-call-non-obj.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
self-missing-method.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
shadow.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
slot-as-pred.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
spawn-non-nil-fn.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
swap-no-lval.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
swap-uninit.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
tag-type-args.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
tail-non-call.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
tail-typeck.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
type-arg-out-of-scope.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
type-mismatch-multiple.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
type-mismatch.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
type-recursive.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
type-shadow.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
unbalanced-comment.rs Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
uninit-after-item.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
unreachable-arm.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
unsafe-alias-2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
unsafe-alias.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
unsafe-alt.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
unsafe-for.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
unsafe-mutable-alias.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
use-after-move.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
use-meta-dup.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
use-meta-mismatch.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
use-meta.rc Re-enable tidy (it was broken) and fix various non-tidy things. 2011-06-29 15:14:55 -07:00
use-uninit-2.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
use-uninit-3.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
use-uninit.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
vec-field.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
vector-no-ann.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
while-bypass.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
while-expr.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
while-loop-constraints.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
while-loop-pred-constraints.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
while-type-error.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
writing-through-read-alias.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
writing-through-uninit-vec.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
writing-to-immutable-obj.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
writing-to-immutable-rec.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00
writing-to-immutable-vec.rs Remove all xfail-stage0 directives 2011-08-03 10:55:59 -07:00
wrong-ret-type.rs Reformat for new syntax 2011-07-27 15:54:33 +02:00