Skip to content

Commit

Permalink
Fixed #4125: CodeGen: __crystal_raise fun is expanded with double body
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Mar 9, 2017
1 parent 176bd62 commit 5b32e46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/compiler/crystal/codegen/codegen.cr
Expand Up @@ -349,6 +349,10 @@ module Crystal
end

unless node.external.dead?
# Mark as dead so we don't generate it twice
# (can happen with well known functions like __crystal_raise)
node.external.dead = true

if node.external.used?
codegen_fun node.real_name, node.external, @program, is_exported_fun: true
else
Expand Down

0 comments on commit 5b32e46

Please sign in to comment.