Skip to content

Commit

Permalink
Fixes #4336. Use original_location for debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian J. Cardiff committed May 2, 2017
1 parent 67d4b21 commit 3b752a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/crystal/codegen/codegen.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ module Crystal
] of ASTNode

if location = node.location
pieces << StringLiteral.new(", at #{location.filename}:#{location.line_number}").at(node)
pieces << StringLiteral.new(", at #{location.original_location}:#{location.line_number}").at(node)
end

ex = Call.new(Path.global("TypeCastError").at(node), "new", StringInterpolation.new(pieces).at(node)).at(node)
Expand Down

0 comments on commit 3b752a3

Please sign in to comment.