BUG: called create_llvm_type for M (Exception)
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'raise<Exception>:NoReturn'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'raise<String>:NoReturn'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::LLVMTyper#create_llvm_type<Crystal::Type+, Bool>:NoReturn'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::LLVMTyper#llvm_type<Crystal::Type+, Bool>:LLVM::Type'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::LLVMTyper#create_llvm_type<Crystal::PointerInstanceType, Bool>:LLVM::Type'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::LLVMTyper#llvm_type<Crystal::Type+, Bool>:LLVM::Type'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::LLVMTyper#create_llvm_struct_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Bool>:LLVM::Type'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::LLVMTyper#llvm_struct_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Bool>:LLVM::Type'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::LLVMTyper#create_llvm_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Bool>:LLVM::Type'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::LLVMTyper#llvm_type<Crystal::Type+, Bool>:LLVM::Type'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::LLVMTyper#create_llvm_struct_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Bool>:LLVM::Type'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::LLVMTyper#llvm_struct_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Bool>:LLVM::Type'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Crystal::Type+>:Pointer(Void)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<Crystal::MixedUnionType, Crystal::Type+>:Pointer(Void)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Crystal::Type+>:Pointer(Void)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Crystal::Type+>:Pointer(Void)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<Crystal::PointerInstanceType, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Crystal::Type+>:Pointer(Void)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<Crystal::PointerInstanceType, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Crystal::Type+>:Pointer(Void)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Crystal::Type+>:Pointer(Void)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Crystal::Type+>:Pointer(Void)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<Crystal::PointerInstanceType, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_debug_type<(Crystal::GenericClassInstanceType+ | Crystal::GenericClassType+ | Crystal::GenericModuleInstanceType | Crystal::GenericModuleType | Crystal::NonGenericClassType | Crystal::NonGenericModuleType+ | Crystal::VirtualType), Crystal::Type+>:Pointer(Void)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#get_debug_type<Crystal::Type+, Crystal::Type+>:(LibLLVM::MetadataRef | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#codegen_fun<String, Crystal::Def+, Crystal::Type+, Bool, Crystal::CodeGenVisitor::ModuleInfo, Bool, Bool>:Crystal::LLVMTypedFunction'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#target_def_fun<Crystal::Def+, Crystal::Type+>:Crystal::LLVMTypedFunction'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::Call>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#create_initialize_class_var_function<Crystal::MetaTypeVar, Crystal::ClassVarInitializer>:(Crystal::LLVMTypedFunction | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#initialize_class_var<Crystal::MetaTypeVar>:(LLVM::Value | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#codegen_assign<Crystal::ASTNode+, Crystal::ASTNode+, Crystal::Assign>:(Bool | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::Assign>:(Bool | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::Expressions>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::ClassDef>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::ModuleDef>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::ModuleDef>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::ModuleDef>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::FileNode>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::Expressions>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::FileNode>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::Expressions>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::FileNode>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::CodeGenVisitor#visit<Crystal::Expressions>:Bool'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::CodeGenVisitor>:Nil'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::Compiler#codegen<Crystal::Program, Crystal::ASTNode+, Array(Crystal::Compiler::Source), String>:(Tuple(Array(Crystal::Compiler::CompilationUnit), Array(String)) | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::Compiler#compile:combine_rpath<Array(Crystal::Compiler::Source), String, Bool>:Crystal::Compiler::Result'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'Crystal::Command::run<Array(String)>:(Bool | Crystal::Repl::Value | Nil)'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in '__crystal_main'
from /opt/homebrew/Cellar/crystal/1.11.2/bin/crystal in 'main'
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
Description
It appears trying to compile a Marten project in debug mode (with the
--debugoption) results in a compilation error. The problem might be on the Crystal compiler side of things, but let's investigate.Versions
How to reproduce
marten new project testprojectcd testprojectshards installcrystal build src/server.cr -o bin/server --debugThe following error is returned: