Fix type errors.
This commit is contained in:
parent
fe19ddc3a7
commit
ff71668f0a
@ -974,7 +974,7 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
res_current = resource.version
|
||||
res_current = T.must(resource.version)
|
||||
res_latest = Version.new(match_version_map.values.max_by { |v| LivecheckVersion.create(resource, v) })
|
||||
|
||||
return status_hash(resource, "error", ["Unable to get versions"], verbose: verbose) if res_latest.blank?
|
||||
|
||||
@ -194,7 +194,7 @@ class Resource < Downloadable
|
||||
def version(val = nil)
|
||||
return super() if val.nil?
|
||||
|
||||
@version = case val
|
||||
@version = case T.unsafe(val)
|
||||
when String
|
||||
val.blank? ? Version::NULL : Version.new(val)
|
||||
when Version
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user