fixes tconfusing_arrow bug

This commit is contained in:
Araq 2015-01-10 22:57:22 +01:00
commit 8cb31d86b6
2 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,15 @@
import algorithm, future
type Deck = object
value: int
proc sort(h: var seq[Deck]) =
# works:
h.sort(proc (x, y: Deck): auto =
cmp(x.value, y.value))
# fails:
h.sort((x, y: Deck) => cmp(ord(x.value), ord(y.value)))
var player: seq[Deck] = @[]
player.sort()