Fix build breakage

This commit is contained in:
Tim Chevalier 2012-08-14 21:13:05 -07:00
parent ccd36439f7
commit fa0e96e0f7
2 changed files with 4 additions and 2 deletions

View File

@ -41,6 +41,7 @@ import f64::{lgamma, ln, log_radix, ln1p, log10, log2, ilog_radix};
import f64::{modf, pow, round, sinh, tanh, tgamma, trunc};
import f64::signbit;
import f64::{j0, j1, jn, y0, y1, yn};
import num::from_int;
const NaN: float = 0.0/0.0;
@ -523,7 +524,7 @@ fn test_traits() {
fn test<U:num::Num>(ten: &U) {
assert (ten.to_int() == 10);
let two = from_int(2);
let two: U = from_int(2);
assert (two.to_int() == 2);
assert (ten.add(two) == from_int(12));

View File

@ -1,5 +1,6 @@
import T = inst::T;
import cmp::{Eq, Ord};
import num::from_int;
export min_value, max_value;
export min, max;
@ -238,7 +239,7 @@ fn test_interfaces() {
fn test<U:num::Num>(ten: U) {
assert (ten.to_int() == 10);
let two = from_int(2);
let two: U = from_int(2);
assert (two.to_int() == 2);
assert (ten.add(two) == from_int(12));