Closed
Description
The tests for this crate compile ok:
#[link(name = "complex", vers = "test")];
#[crate_type = "lib"];
pub struct ComplexT<T> { x: T, y: T, z: T }
impl<T> ComplexT<T> {
pub fn new(x: T, y: T, z: T) -> ComplexT<T> {
ComplexT { x: x, y: y, z: z }
}
}
pub type Complex32 = ComplexT<f32>;
pub mod Complex32 {
use super::*;
pub fn new(x: f32, y: f32, z: f32) -> Complex32 {
ComplexT::new(x, y, z)
}
}
#[test]
fn test_Complex() {
let v = Complex32::new(1.0, 2.0, 3.0);
println(fmt!("%?", v));
}
This is incompatible with #6894, and should probably be forbidden.
Metadata
Metadata
Assignees
Labels
No labels