graydon/rust — Issue #1471: Generic type can't be inferred through lambda block
Author: brson
Created: 2012-01-09 01:21:59+00:00
State: open
Labels: bug, typeck, unassigned

```
type actor = {
unused: bool
};

type self = {
unused: bool
};

fn act(+behavior: sendfn(self)) -> actor {
{unused: true}
}

tag in {
preprocess([u8]);
exit;
}

fn mk() -> actor {
act {|self|
}
}

fn main() {
}
```

```
../src/test/run-pass/block-infer.rs:19:4: 19:7 error: cannot determine a type for this expression
../src/test/run-pass/block-infer.rs:19 act {|self|
```

Writing `act::` allows it to work.