Conversation
|
For @rows it seems T is something like Tuple(Int32.class, String.class) and you need @rows to be Array(Tuple(Int32, String))... though I'm also seeing this: Here T is not a tuple and @rows is more or less T. Right now there's no way to express that. But since Then I think PG::Result::Row will maybe need to be generic too because you won't be able to just say The problem about the decoder is a bug, currently with this: class Foo(T)
def initialize
@array = Array.new(10, 0)
end
def array
@array
end
endthe compiler infers |
|
I'm also trying to think of a way to pass from a class type to its instance type, but I can't find it with the current language. We have |
|
I managed to get all the specs passing. The row problem was fixed by removing the memoization. I also had to make |
|
Woops, that's a bug too. I'll fix it 😊 |
|
Yes, please drop |
cafe233 to
cafe5e9
Compare
I'm having trouble with some of the changes for the new stuff in crystal-lang/crystal#2443
I don't think
@read_eventis ever set in @ysbaddaden 's #31 so commenting it out in 1f52767 worksOther than that though, I've been stuck on a few cases with
crystal specand was wondering if @asterite or anyone could spare a few minutes.The two things so far:
@rowsin result.crfields[col].decoder.decode(val_ptr.to_slice(size))line was complaining that afields[col]was returning procs, but that isn't happening for me right now, also it doesn't return procs :/. That may have just been some other error I lost when I started over.