2012-07-14 00:57:48 -05:00
|
|
|
fn wants_box(x: @str) { }
|
|
|
|
fn wants_uniq(x: ~str) { }
|
2012-04-14 20:45:03 -05:00
|
|
|
fn wants_three(x: str/3) { }
|
|
|
|
|
2012-07-14 00:57:48 -05:00
|
|
|
fn has_box(x: @str) {
|
2012-04-14 20:45:03 -05:00
|
|
|
wants_box(x);
|
2012-06-30 06:23:59 -05:00
|
|
|
wants_uniq(x); //~ ERROR str storage differs: expected ~ but found @
|
|
|
|
wants_three(x); //~ ERROR str storage differs: expected 3 but found @
|
2012-04-14 20:45:03 -05:00
|
|
|
}
|
|
|
|
|
2012-07-14 00:57:48 -05:00
|
|
|
fn has_uniq(x: ~str) {
|
2012-06-30 06:23:59 -05:00
|
|
|
wants_box(x); //~ ERROR str storage differs: expected @ but found ~
|
2012-04-14 20:45:03 -05:00
|
|
|
wants_uniq(x);
|
2012-06-30 06:23:59 -05:00
|
|
|
wants_three(x); //~ ERROR str storage differs: expected 3 but found ~
|
2012-04-14 20:45:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn has_three(x: str/3) {
|
2012-06-30 06:23:59 -05:00
|
|
|
wants_box(x); //~ ERROR str storage differs: expected @ but found 3
|
|
|
|
wants_uniq(x); //~ ERROR str storage differs: expected ~ but found 3
|
2012-04-14 20:45:03 -05:00
|
|
|
wants_three(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn has_four(x: str/4) {
|
2012-06-30 06:23:59 -05:00
|
|
|
wants_box(x); //~ ERROR str storage differs: expected @ but found 4
|
|
|
|
wants_uniq(x); //~ ERROR str storage differs: expected ~ but found 4
|
|
|
|
wants_three(x); //~ ERROR str storage differs: expected 3 but found 4
|
2012-04-14 20:45:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|