Skip to content

Commit

Permalink
Add a comment about the explicit .as(...) case
Browse files Browse the repository at this point in the history
  • Loading branch information
f-fr committed Jun 25, 2018
1 parent 24a06a8 commit 2d22a69
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bindgen/find_path.cr
Expand Up @@ -65,6 +65,9 @@ module Bindgen
def find(config : PathConfig, additional = nil) : String?
search_paths = get_search_paths(config)
checkers = config.checks.map do |check_config|
# The explicit cast .as(Checker) should not be necessary because
# Checker.create is already declared as returning Checker (and not one
# of its subclasses). Could be a Crystal bug.
Checker.create(check_config, !config.kind.directory?).as(Checker)
end

Expand Down

0 comments on commit 2d22a69

Please sign in to comment.