The code fragment below is from a file, utilities.nim, that compiled with 0.18 
and produces the error below with 0.19.

> 72 type 73 ColumnKind* = enum 74 text, 75 integer, 76 float 77 Column* = 
> object 78 case kind*:ColumnKind 79 of text: textVal*:string 80 of integer: 
> integerVal*: int32 81 of float: floatVal*: float64 82 OneRow* = seq[Column] 
> 83 proc oneRow*(stmt:Pstmt, maybeOneP:bool):(int8, OneRow) = 84 var rows:int8 
> = 0 85 var value:OneRow = @[] 86 while (nextRowAvailableP(stmt, RESET)): 87 
> for i in 0'i32..<s.column_count(stmt): 88 case s.column_type(stmt,i) 89 of 
> SQLITE_TEXT: value.add(Column(kind:text, textVal: $s.column_text(stmt,i))) 90 
> of SQLITE_INTEGER: value.add(Column(kind:integer, integerVal: 
> s.column_int(stmt,i))) 91 of SQLITE_FLOAT: value.add(Column(kind:float, 
> floatVal: s.column_double(stmt,i))) 92 else: panic("oneRow:incorrect type 
> returned") 93 rows = rows+1 94 stmt.reset 95 case rows 96 of 0: 97 if 
> maybeOneP: 98 return (0, @[]) 99 else:

> 100 panic("oneRow: no rows returned") 101 of 1: 102 return (rows, value) 103 
> else: 104 panic("oneRow: query returned more than one row") 105
> 
> make: *** [makefile:9: composite_register] Error 1

I don't understand why assigning the null sequence to a variable of type OneRow 
is acceptable on line 85 but not acceptable as the OneRow component of the 
return value in line 98. I also don't understand why this compiled without 
error with the previous version of the compiler and not this one. If this is 
not a bug, please help me to understand why. 

Reply via email to