Open Geo-7 opened 4 years ago
I am getting the same error with postgres:
require "db"
require "pg"
db = DB.open("lol")
db.query_all("test") { |rs|
rs.each {
rs.each_column { |col|
}
}
}
BUG: trying to downcast DB::ResultSet+ (Crystal::VirtualType) <- PG::ResultSet (Crystal::NonGenericClassType) (Exception)
from /crystal/src/compiler/crystal/codegen/cast.cr:521:5 in 'downcast_distinct'
from /crystal/src/compiler/crystal/codegen/cast.cr:297:15 in 'downcast:extern'
from /crystal/src/compiler/crystal/codegen/codegen.cr:1284:17 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:28:11 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2409:7 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/exception.cr:92:7 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/enumerable.cr:510:7 in '??'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/enumerable.cr:510:7 in '??'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/enumerable.cr:510:7 in '??'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2392:9 in 'visit'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/enumerable.cr:510:7 in '??'
from /crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
from /crystal/src/compiler/crystal/codegen/codegen.cr:2362:7 in 'codegen'
from /crystal/src/compiler/crystal/compiler.cr:202:16 in 'compile:combine_rpath'
from /crystal/src/compiler/crystal/compiler.cr:195:56 in 'compile:combine_rpath'
from /crystal/src/compiler/crystal/command.cr:239:5 in 'run'
from /crystal/src/compiler/crystal.cr:11:1 in '__crystal_main'
from /crystal/src/crystal/main.cr:129:5 in 'main'
from src/env/__libc_start_main.c:95:2 in 'libc_start_main_stage2'
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues
Crystal 1.12.1 [4cea10199] (2024-04-11)
LLVM: 15.0.7
Default target: x86_64-unknown-linux-gnu
crystal -v Crystal 0.35.1 [5999ae29b] (2020-06-19)
LLVM: 8.0.0 Default target: x86_64-unknown-linux-gnu
OUTPUT: