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

LLVM validation error in flat_map #5803

Closed
jhass opened this issue Mar 10, 2018 · 0 comments · Fixed by #10329
Closed

LLVM validation error in flat_map #5803

jhass opened this issue Mar 10, 2018 · 0 comments · Fixed by #10329
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:codegen

Comments

@jhass
Copy link
Member

jhass commented Mar 10, 2018

Okay, sorry for the issue title but I don't even...

array = [1, 2, [[3]]]
array.flat_map {|item| item.is_a?(Array) ? item : [item] of typeof(array)|typeof(array.first) }
Module validation failed: Function return type does not match operand type of return inst!
  ret %"(Array(Array(Array(Int32)) | Int32) | Array(Array(Int32)) | Array(Int32) | Int32)" %1, !dbg !45
 %"(Array(Array(Array(Int32)) | Int32) | Array(Array(Int32)) | Int32)" = type { i32, [1 x i64] }
???
???
???
???
???
__crystal_main
main
__libc_start_main
_start
???

https://carc.in/#/r/3p5k

@jhass jhass added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:codegen labels Apr 15, 2020
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:codegen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant