You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by KosKosynsky on the #science channel (added steps for a minimal repro):
import datamancer, strutils
var flota =toDf({"x" : @["a", "b"], "y" : @["1", "2"], "z" : @[1, 3]})
let flota_cols = flota.getKeys()
for i_col in flota_cols:
if (flota[i_col].nativeColKind == colString):
flota = flota.mutate(f{string->string: i_col ~strip(idx(i_col))})
echo flota
which fails in the determineTypeFromProc helper, which tries to look at the default arguments for type info from the latest argument to strip (we shouldn't even have to look at that, but in any case shouldn't fail!).
The issue is that we assume that the last field of a default nnkIdentDefs is a symbol, but it's not in this case. The offending node is:
Note: the code snippet in the issue works nowadays. I need to check the code again to see if should in theory work in general cases now and if so close this issue.
Reported by KosKosynsky on the #science channel (added steps for a minimal repro):
which fails in the
determineTypeFromProc
helper, which tries to look at the default arguments for type info from thelatest
argument to strip (we shouldn't even have to look at that, but in any case shouldn't fail!).The issue is that we assume that the last field of a default
nnkIdentDefs
is a symbol, but it's not in this case. The offending node is:from the
params
sequence:Instead of
we should check if the node is a type first before calling
getType
.Question: what to do for idents?
Just find a way to fix it... :)
The text was updated successfully, but these errors were encountered: