Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler bug #4007

Closed
Sija opened this issue Feb 7, 2017 · 0 comments
Closed

Compiler bug #4007

Sija opened this issue Feb 7, 2017 · 0 comments
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:debugger
Milestone

Comments

@Sija
Copy link
Contributor

Sija commented Feb 7, 2017

class Foo(K, V)
  Q = V | Array(Q) | Set(Q) | Hash(K, Q)
end

class Bar < Foo(String, Int32)
end

pp Bar::Q

Above code fails with compiler exception:

Module validation failed: inlinable function call in a function with debug info must have a !dbg location
  call void @"*raise<String>:NoReturn"(%String* bitcast ({ i32, i32, i32, [151 x i8] }* @"'can't execute `Pret...'" to %String*))

0x108dca983: *raise<String>:NoReturn at ??
0x109bf9d6a: *Crystal::CodeGenVisitor#finish:Nil at ??
0x109b4454d: *Crystal::Compiler#codegen<Crystal::Program, Crystal::ASTNode+, Array(Crystal::Compiler::Source), String>:Nil at ??
0x10a4125c5: *Crystal::Command#run_command<Bool>:Nil at ??
0x108e24493: *Crystal::Command#run:(Bool | Crystal::Compiler::Result | IO::FileDescriptor | Nil) at ??
0x108df1077: main at ??

Possibly related to #2665.

@asterite asterite added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler topic:compiler:debugger and removed topic:compiler labels Feb 7, 2017
@asterite asterite mentioned this issue Feb 7, 2017
@asterite asterite added this to the Next milestone Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:debugger
Projects
None yet
Development

No branches or pull requests

2 participants