Skip to content

Commit 7586082

Browse files
committed
Add tests for programs that are invalid by arg-passing-style
Closes #1008
1 parent 8db7153 commit 7586082

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// error-pattern: mismatched types
2+
3+
fn f(&&_x: int) {}
4+
fn g(_a: fn(+int)) {}
5+
fn main() { g(f); }
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// error-pattern:can not pass a dynamically-sized type by value
2+
3+
fn f<T>(+_x: T) {}
4+
fn main() {}

0 commit comments

Comments
 (0)