Skip to content

Commit

Permalink
Test for issue 1896 (which appears to be fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Jun 21, 2012
1 parent 453e29c commit 2a53640
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/compile-fail/issue-1896.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
type t<T> = { f: fn() -> T };

fn f<T>(_x: t<T>) {}

fn main() {
let x: t<()> = { f: { || () } }; //! ERROR expressions with stack closure
f(x);
}

0 comments on commit 2a53640

Please sign in to comment.