Add tests for programs that are invalid by arg-passing-style

Closes #1008
This commit is contained in:
Marijn Haverbeke 2011-10-07 09:50:30 +02:00
parent 8db71530f5
commit 7586082bb0
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,5 @@
// error-pattern: mismatched types
fn f(&&_x: int) {}
fn g(_a: fn(+int)) {}
fn main() { g(f); }

View File

@ -0,0 +1,4 @@
// error-pattern:can not pass a dynamically-sized type by value
fn f<T>(+_x: T) {}
fn main() {}