Camel case various core constructors
This commit is contained in:
parent
4ba9fdd362
commit
161a82e433
113 changed files with 530 additions and 545 deletions
|
|
@ -3,13 +3,13 @@
|
|||
// error-pattern:1 == 2
|
||||
use std;
|
||||
import task;
|
||||
import comm::port;
|
||||
import comm::Port;
|
||||
import comm::recv;
|
||||
|
||||
fn child() { assert (1 == 2); }
|
||||
|
||||
fn main() {
|
||||
let p = port::<int>();
|
||||
let p = Port::<int>();
|
||||
task::spawn(|| child() );
|
||||
let x = recv(p);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
// error-pattern:fail
|
||||
use std;
|
||||
import task;
|
||||
import comm::chan;
|
||||
import comm::port;
|
||||
import comm::Chan;
|
||||
import comm::Port;
|
||||
import comm::recv;
|
||||
|
||||
fn child() { fail; }
|
||||
|
||||
fn main() {
|
||||
let p = port::<int>();
|
||||
let p = Port::<int>();
|
||||
task::spawn(|| child() );
|
||||
task::yield();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,19 +3,19 @@
|
|||
// error-pattern:fail
|
||||
use std;
|
||||
import task;
|
||||
import comm::port;
|
||||
import comm::Port;
|
||||
import comm::recv;
|
||||
|
||||
fn grandchild() { fail ~"grandchild dies"; }
|
||||
|
||||
fn child() {
|
||||
let p = port::<int>();
|
||||
let p = Port::<int>();
|
||||
task::spawn(|| grandchild() );
|
||||
let x = recv(p);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let p = port::<int>();
|
||||
let p = Port::<int>();
|
||||
task::spawn(|| child() );
|
||||
let x = recv(p);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
// error-pattern:1 == 2
|
||||
use std;
|
||||
import task;
|
||||
import comm::chan;
|
||||
import comm::port;
|
||||
import comm::Chan;
|
||||
import comm::Port;
|
||||
import comm::recv;
|
||||
|
||||
fn child() { assert (1 == 2); }
|
||||
|
||||
fn parent() {
|
||||
let p = port::<int>();
|
||||
let p = Port::<int>();
|
||||
task::spawn(|| child() );
|
||||
let x = recv(p);
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ fn parent() {
|
|||
// This task is not linked to the failure chain, but since the other
|
||||
// tasks are going to fail the kernel, this one will fail too
|
||||
fn sleeper() {
|
||||
let p = port::<int>();
|
||||
let p = Port::<int>();
|
||||
let x = recv(p);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
// error-pattern:meep
|
||||
use std;
|
||||
import comm::Chan;
|
||||
import comm::chan;
|
||||
import comm::port;
|
||||
import comm::Port;
|
||||
import comm::send;
|
||||
import comm::recv;
|
||||
|
||||
fn echo<T: send>(c: Chan<T>, oc: Chan<Chan<T>>) {
|
||||
// Tests that the type argument in port gets
|
||||
// visited
|
||||
let p = port::<T>();
|
||||
send(oc, chan(p));
|
||||
let p = Port::<T>();
|
||||
send(oc, Chan(p));
|
||||
|
||||
let x = recv(p);
|
||||
send(c, x);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ fn goodfail() {
|
|||
|
||||
fn main() {
|
||||
task::spawn(|| goodfail() );
|
||||
let po = comm::port();
|
||||
let po = comm::Port();
|
||||
// We shouldn't be able to get past this recv since there's no
|
||||
// message available
|
||||
let i: int = comm::recv(po);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue