new tests for things we'll have to fix eventually

This commit is contained in:
Niko Matsakis 2012-04-05 09:10:14 -07:00
parent 5a3875e998
commit 79cbdba037
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
// xfail-test
fn ignore<T>(t: T) {}
fn nested(x: &x.int) {
let y = 3;
let mut ay = &y;
ignore(fn&(z: &z.int) {
ay = x;
ay = &y;
ay = z; //! ERROR foo
});
ignore(fn&(z: &z.int) -> &z.int {
if false { ret x; } //! ERROR bar
if false { ret &y; } //! ERROR bar
if false { ret ay; } //! ERROR bar
ret z;
});
}
fn main() {}