rust/src/test/run-pass/unify-return-ty.rs
2012-09-05 12:32:05 -07:00

9 lines
235 B
Rust

// Tests that the tail expr in null() has its type
// unified with the type *T, and so the type variable
// in that type gets resolved.
use std;
fn null<T>() -> *T unsafe { unsafe::reinterpret_cast(&0) }
fn main() { null::<int>(); }