-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assuming we rarely pass an unknown integer value to `rand` for `Float` result.
- Loading branch information
Showing
5 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
D = Steep::Diagnostic | ||
|
||
target :test do | ||
signature "." | ||
check "." | ||
configure_code_diagnostics(D::Ruby.all_error) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# @type var int: Integer | ||
# @type var float: Float | ||
|
||
float = rand(0) | ||
Check failure on line 4 in test/typecheck/random/test.rb GitHub Actions / test (head, stdlib_test rubocop)
|
||
int = rand(1) | ||
Check failure on line 5 in test/typecheck/random/test.rb GitHub Actions / test (head, stdlib_test rubocop)
|
||
|
||
i = 2 | ||
int = rand(i) | ||
|
||
int = rand(1..10) || 0 | ||
float = rand((1.0)..(2.2)) || 0.1 | ||
|
||
int = rand(1.1) |