bcc
bcc copied to clipboard
Generics self increment issue
Hey,
Seems like "self increment" i.e. var :+ 1 for instance isn't working properly with generics.
Switch the commented line with the one beneath it and you'll see the issue at hand.
Framework BRL.Blitz
Import BRL.Collections
Import BRL.StandardIO
Import Random.Core
Import BRL.Random
Local map:TTreeMap<Int, Int> = New TTreeMap<Int, Int>()
For Local i:Int = 0 Until 1000
Local key:Int = Rand(0, 10)
' map[key] :+ 1
map[key] = map[key] + 1
Next
For Local i:Int = EachIn map.Keys()
Print i + ": " + map[i]
Next
Thanks and have a good day!