Add two tests, one xfailed, for inferring lambda kinds in return position

This commit is contained in:
Brian Anderson 2012-07-01 18:08:53 -07:00
parent 494264711d
commit fa6a446e6c
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,9 @@
// Test that the lambda kind is inferred correctly as a return
// expression
fn shared() -> fn@() { ret || (); }
fn unique() -> fn~() { ret || (); }
fn main() {
}

View File

@ -0,0 +1,10 @@
// xfail-test fn~ is not inferred
// Test that the lambda kind is inferred correctly as a return
// expression
fn shared() -> fn@() { || () }
fn unique() -> fn~() { || () }
fn main() {
}