2011-08-19 00:16:54 -05:00
|
|
|
// Just a grab bug of stuff that you wouldn't want to actualy write
|
|
|
|
|
2011-08-19 17:16:48 -05:00
|
|
|
fn strange() -> bool { let _x = ret true; }
|
2011-08-19 00:16:54 -05:00
|
|
|
|
|
|
|
fn funny() {
|
2011-08-19 17:16:48 -05:00
|
|
|
fn f(_x: ()) { }
|
2011-08-19 00:16:54 -05:00
|
|
|
f(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn what() {
|
2011-09-15 02:48:39 -05:00
|
|
|
fn the(x: @mutable bool) { ret while !*x { *x = true; }; }
|
2011-08-19 00:16:54 -05:00
|
|
|
let i = @mutable false;
|
|
|
|
let dont = bind the(i);
|
|
|
|
dont();
|
2011-08-19 17:16:48 -05:00
|
|
|
assert (*i);
|
2011-08-19 00:16:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn zombiejesus() {
|
2011-09-15 23:24:24 -05:00
|
|
|
do {
|
|
|
|
while (ret) {
|
|
|
|
if (ret) {
|
|
|
|
alt (ret) { _ { ret ? ret : ret } };
|
|
|
|
} else if (ret) {
|
|
|
|
ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} while ret
|
2011-08-19 00:16:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn notsure() {
|
|
|
|
let _x;
|
|
|
|
let _y = (_x = 0) == (_x = 0);
|
|
|
|
let _z = (_x <- 0) < (_x = 0);
|
|
|
|
let _a = (_x += 0) == (_x = 0);
|
|
|
|
let _b = (_y <-> _z) == (_y <-> _z);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn hammertime() -> int {
|
2011-09-25 23:13:52 -05:00
|
|
|
let _x = log true == (ret 0);
|
2011-08-19 00:16:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn canttouchthis() -> uint {
|
2011-08-23 20:25:50 -05:00
|
|
|
pure fn p() -> bool { true }
|
2011-08-19 17:16:48 -05:00
|
|
|
let _a = (assert (true)) == (check (p()));
|
|
|
|
let _c = (check (p())) == ();
|
2011-08-19 00:16:54 -05:00
|
|
|
let _b = (log 0) == (ret 0u);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn angrydome() {
|
2011-08-19 17:16:48 -05:00
|
|
|
while true { if break { } }
|
2011-08-19 00:16:54 -05:00
|
|
|
let i = 0;
|
2011-08-19 17:16:48 -05:00
|
|
|
do { i += 1; if i == 1 { alt cont { _ { } } } } while false
|
2011-08-19 00:16:54 -05:00
|
|
|
}
|
|
|
|
|
2011-08-19 17:16:48 -05:00
|
|
|
fn evil_lincoln() { let evil <- log "lincoln"; }
|
2011-08-19 00:16:54 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
strange();
|
|
|
|
funny();
|
|
|
|
what();
|
|
|
|
zombiejesus();
|
|
|
|
notsure();
|
|
|
|
hammertime();
|
|
|
|
canttouchthis();
|
|
|
|
angrydome();
|
|
|
|
evil_lincoln();
|
|
|
|
}
|