mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-06 11:54:11 +00:00
fixes #1366
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user