2012-06-29 16:26:56 -07:00
|
|
|
fn wants_box(x: @[uint]) { }
|
|
|
|
fn wants_uniq(x: ~[uint]) { }
|
2012-10-10 00:28:04 -04:00
|
|
|
fn wants_three(x: [uint * 3]) { }
|
2012-04-14 18:45:03 -07:00
|
|
|
|
2012-06-29 16:26:56 -07:00
|
|
|
fn has_box(x: @[uint]) {
|
2012-04-14 18:45:03 -07:00
|
|
|
wants_box(x);
|
2012-06-30 12:23:59 +01:00
|
|
|
wants_uniq(x); //~ ERROR [] storage differs: expected ~ but found @
|
|
|
|
wants_three(x); //~ ERROR [] storage differs: expected 3 but found @
|
2012-04-14 18:45:03 -07:00
|
|
|
}
|
|
|
|
|
2012-06-29 16:26:56 -07:00
|
|
|
fn has_uniq(x: ~[uint]) {
|
2012-06-30 12:23:59 +01:00
|
|
|
wants_box(x); //~ ERROR [] storage differs: expected @ but found ~
|
2012-04-14 18:45:03 -07:00
|
|
|
wants_uniq(x);
|
2012-06-30 12:23:59 +01:00
|
|
|
wants_three(x); //~ ERROR [] storage differs: expected 3 but found ~
|
2012-04-14 18:45:03 -07:00
|
|
|
}
|
|
|
|
|
2012-10-10 00:28:04 -04:00
|
|
|
fn has_three(x: [uint * 3]) {
|
2012-06-30 12:23:59 +01:00
|
|
|
wants_box(x); //~ ERROR [] storage differs: expected @ but found 3
|
|
|
|
wants_uniq(x); //~ ERROR [] storage differs: expected ~ but found 3
|
2012-04-14 18:45:03 -07:00
|
|
|
wants_three(x);
|
|
|
|
}
|
|
|
|
|
2012-10-10 00:28:04 -04:00
|
|
|
fn has_four(x: [uint * 4]) {
|
2012-06-30 12:23:59 +01:00
|
|
|
wants_box(x); //~ ERROR [] storage differs: expected @ but found 4
|
|
|
|
wants_uniq(x); //~ ERROR [] storage differs: expected ~ but found 4
|
|
|
|
wants_three(x); //~ ERROR [] storage differs: expected 3 but found 4
|
2012-04-14 18:45:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|