This commit is contained in:
Araq
2014-08-30 20:16:35 +02:00
parent 5fad73c8d0
commit 0257f389fe
2 changed files with 11 additions and 3 deletions

View File

@@ -126,7 +126,7 @@ proc magicsAfterOverloadResolution(c: PContext, n: PNode,
result.typ = getSysType(tyString)
of mInstantiationInfo: result = semInstantiationInfo(c, n)
of mOrd: result = semOrd(c, n)
of mHigh: result = semLowHigh(c, n, mHigh)
of mHigh, mLow: result = semLowHigh(c, n, n[0].sym.magic)
of mShallowCopy: result = semShallowCopy(c, n, flags)
of mNBindSym: result = semBindSym(c, n)
of mLocals: result = semLocals(c, n)

View File

@@ -1,9 +1,9 @@
import tables
type
TX = TTable[string, int]
TX = Table[string, int]
proc foo(models: seq[TTable[string, float]]): seq[float] =
proc foo(models: seq[Table[string, float]]): seq[float] =
result = @[]
for model in models.items:
result.add model["foobar"]
@@ -16,4 +16,12 @@ proc foo[T](p: TType[T, range[0..1]]) =
proc foo[T](p: TType[T, range[0..2]]) =
echo "bar"
#bug #1366
proc reversed(x) =
for i in countdown(x.low, x.high):
echo i
reversed(@[-19, 7, -4, 6])