Test for #2242 (xfailed for now)

This commit is contained in:
Tim Chevalier 2012-06-20 16:23:45 -07:00
parent 8040fd86bf
commit c50eea17d4
4 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#[link(name = "a", vers = "0.1")];
#[crate_type = "lib"];
iface to_str {
fn to_str() -> str;
}
impl of to_str for str {
fn to_str() -> str { self }
}

View File

@ -0,0 +1,9 @@
#[link(name = "b", vers = "0.1")];
#[crate_type = "lib"];
use a;
import a::to_str;
impl of to_str for int {
fn to_str() -> str { #fmt("%?", self) }
}

View File

@ -0,0 +1,10 @@
#[link(name = "c", vers = "0.1")];
#[crate_type = "lib"];
use a;
import a::to_str;
impl of to_str for bool {
fn to_str() -> str { #fmt("%b", self) }
}

View File

@ -0,0 +1,17 @@
// xfail-test
// aux-build:issue_2242_a.rs
// aux-build:issue_2242_b.rs
// aux-build:issue_2242_c.rs
use a;
use b;
use c;
import b::to_str;
import c::to_str;
fn main() {
io::println("foo".to_str());
io::println(1.to_str());
io::println(true.to_str());
}