Skip to content

Commit

Permalink
Removed unnecessary code now that we have a robust solution to the No…
Browse files Browse the repository at this point in the history
…Return issue
  • Loading branch information
Ary Borenszweig committed Dec 13, 2014
1 parent 55eb66f commit 3c8f344
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/compiler/crystal/semantic/type_inference.cr
Original file line number Diff line number Diff line change
Expand Up @@ -785,15 +785,7 @@ module Crystal
check_call_in_initialize node

@type_filters = nil

if node.no_returns?
# If any call argument is NoReturn don't mark this call as unreachable.
# We only do so if the call itself has type NoReturn and all argument
# types are avaialble (such as a raise call, or another call invoking raise).
unless node.args.any? &.type?.try &.no_return?
@unreachable = true
end
end
@unreachable = true if node.no_returns?

false
end
Expand Down

0 comments on commit 3c8f344

Please sign in to comment.