The following code used to compile in nim 0.19:
    
    
    result = newSeq[string]()
          ...
          var tokens = 
li.match(re"\s*(\S+)\s*(?:>\s*(\S.*\S))?\s*").get.captures.toSeq()
          
          # Add to the list of list values
          result.add(tokens[ITEM_NAME])
    
    
    Run

Now, I get the following error:
    
    
    G:\src\nim\vim256\opts.nim(281, 19) Error: type mismatch: got <seq[string], 
Option[system.string]>
    but expected one of:
    proc add[T](x: var seq[T]; y: openArray[T])
      first type mismatch at position: 2
      required type for y: openArray[T]
      but expression 'tokens[0]' is of type: Option[system.string]
    proc add[T](x: var seq[T]; y: T)
      first type mismatch at position: 2
      required type for y: T
      but expression 'tokens[0]' is of type: Option[system.string]
    9 other mismatching symbols have been suppressed; compile with 
--showAllMismatches:on to see them
    
    
    Run

As I have "been away" from nim for a relatively long period, I would appreciate 
some hint as how to remedy this...

Reply via email to