Skip to content

Commit 7f9fea3

Browse files
committed
---
yaml --- r: 14068 b: refs/heads/try c: 9f0239c h: refs/heads/master v: v3
1 parent e57f782 commit 7f9fea3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: dd510313908dda405235ae769dfa94ed18f715ed
5+
refs/heads/try: 9f0239ce9c24972e8f50b4161130414965886348
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// In this test, the mode gets inferred to ++ due to the apply_int(),
2+
// but then we get a failure in the generic apply().
3+
4+
fn apply<A>(f: fn(A) -> A, a: A) -> A { f(a) }
5+
fn apply_int(f: fn(int) -> int, a: int) -> int { f(a) }
6+
7+
fn main() {
8+
let f = {|i| i};
9+
assert apply_int(f, 2) == 2;
10+
assert apply(f, 2) == 2; //! ERROR expected argument mode ++
11+
}

0 commit comments

Comments
 (0)