summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generics/issue-333.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/generics/issue-333.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/generics/issue-333.rs b/src/test/ui/generics/issue-333.rs
new file mode 100644
index 000000000..0753aaa07
--- /dev/null
+++ b/src/test/ui/generics/issue-333.rs
@@ -0,0 +1,7 @@
+// run-pass
+
+fn quux<T>(x: T) -> T { let f = id::<T>; return f(x); }
+
+fn id<T>(x: T) -> T { return x; }
+
+pub fn main() { assert_eq!(quux(10), 10); }