Skip to content

Commit

Permalink
avoid force_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
417-72KI committed Oct 1, 2023
1 parent d65b81a commit 4f13e58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Generator/Parser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ private extension Parser {
guard let extractedValue = extractProperties(value) else { return nil }
// FIXME: when value is `0` or `1`, it may parsed as Bool unexpectedly.
if extractedValue is Bool, !key.hasPrefix("is") {
// swiftlint:disable:next force_cast
return (key, value as! Int)
}
return (key, extractedValue)
Expand Down

0 comments on commit 4f13e58

Please sign in to comment.