File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 3030 TRenderFlags * = set [TRenderFlag ]
3131 TRenderTok * = object
3232 kind* : TokType
33- length* : int16
33+ length* : int32
3434 sym* : PSym
3535
3636 Section = enum
@@ -154,7 +154,7 @@ proc initSrcGen(renderFlags: TRenderFlags; config: ConfigRef): TSrcGen =
154154 )
155155
156156proc addTok (g: var TSrcGen , kind: TokType , s: string ; sym: PSym = nil ) =
157- g.tokens.add TRenderTok (kind: kind, length: int16 (s.len), sym: sym)
157+ g.tokens.add TRenderTok (kind: kind, length: int32 (s.len), sym: sym)
158158 g.buf.add (s)
159159 if kind != tkSpaces:
160160 inc g.col, s.len
Original file line number Diff line number Diff line change @@ -479,3 +479,10 @@ static:
479479
480480xxx ()
481481
482+
483+ static :
484+ var foo: string
485+ for _ in 0 ..< 100_000 :
486+ foo.add 'a'
487+ doAssert repr (foo).len == 100_002
488+
You can’t perform that action at this time.
0 commit comments