File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
trunk/src/test/compile-fail Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: dd510313908dda405235ae769dfa94ed18f715ed
2
+ refs/heads/master: 9f0239ce9c24972e8f50b4161130414965886348
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments