update to crystal 0.29: undefined method new for T.class
KCErb opened this issue · comments
I'm digging in now, not sure what happened to generics ... the zero method fails for matrices now: https://github.com/konovod/linalg/blob/master/src/matrix/matrix.cr#L22.
in lib/linalg/src/matrix/matrix.cr:22: undefined method 'new' for T.class
T.new(0)
^~~
Yeah, somehow T
isn't expanded to its value in 0.29, i'll investigate it once i have a time.
I think that is a compiler bug, so created crystal-lang/crystal#7914
Still no idea on how to workaround it as it breaks most of inherited methods.
Nice! I was looking through the release notes for generic changes and didn't see any so I was really scratching my head as to which change broke it.
It looks like this will land in v 0.30 thanks to crystal-lang/crystal#7916 so I'll wait to close this until then just in case someone comes along on v29 and experiences the same problem.