Skip to content

Commit 9fda03b

Browse files
committed
---
yaml --- r: 12020 b: refs/heads/master c: 7cc0f55 h: refs/heads/master v: v3
1 parent fa6f310 commit 9fda03b

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9502fb99e0d535c8ced17ac61e63ebbd67b7dba7
2+
refs/heads/master: 7cc0f554ae7fe1c3891e945e3f39b2e93e8cc564
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// test that invoking functions which require
2+
// dictionaries from inside an fn@ works
3+
// (at one point, it didn't)
4+
5+
fn mk_nil<C:ty_ops>(cx: C) -> uint {
6+
cx.mk()
7+
}
8+
9+
iface ty_ops {
10+
fn mk() -> uint;
11+
}
12+
13+
impl of ty_ops for () {
14+
fn mk() -> uint { 22u }
15+
}
16+
17+
fn main() {
18+
let fn_env = fn@() -> uint {
19+
mk_nil(())
20+
};
21+
assert fn_env() == 22u;
22+
}

0 commit comments

Comments
 (0)