Convert some comm tests to istrs. Issue #855

These spawn thunks need to take move-mode strings to be correct
This commit is contained in:
Brian Anderson 2011-09-01 16:39:51 -07:00
parent e412652f00
commit d8a833dccd
3 changed files with 8 additions and 8 deletions

View file

@ -3,6 +3,6 @@
use std;
import std::task;
fn child2(s: str) { }
fn child2(s: -istr) { }
fn main() { let x = task::spawn(bind child2("hi")); }
fn main() { let x = task::spawn(bind child2(~"hi")); }

View file

@ -4,12 +4,12 @@ use std;
import std::task::yield;
import std::task;
fn x(s: str, n: int) { log s; log n; }
fn x(s: -istr, n: int) { log s; log n; }
fn main() {
task::spawn(bind x("hello from first spawned fn", 65));
task::spawn(bind x("hello from second spawned fn", 66));
task::spawn(bind x("hello from third spawned fn", 67));
task::spawn(bind x(~"hello from first spawned fn", 65));
task::spawn(bind x(~"hello from second spawned fn", 66));
task::spawn(bind x(~"hello from third spawned fn", 67));
let i: int = 30;
while i > 0 { i = i - 1; log "parent sleeping"; yield(); }
}

View file

@ -1,7 +1,7 @@
use std;
import std::task;
fn main() { task::spawn(bind child("Hello")); }
fn main() { task::spawn(bind child(~"Hello")); }
fn child(s: str) {
fn child(s: -str) {
}