-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8954 from hizel/logical-processors-type
dialyzer: update erlang:system_info logical_processors type OTP-19307
- Loading branch information
Showing
3 changed files
with
25 additions
and
2 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
5 changes: 5 additions & 0 deletions
5
lib/dialyzer/test/small_SUITE_data/results/logical_processors
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,5 @@ | ||
|
||
logical_processors.erl:11:1: Function t1/0 has no local return | ||
logical_processors.erl:12:7: The pattern 'ok' can never match the type 'unknown' | non_neg_integer() | ||
logical_processors.erl:14:1: Function t2/0 has no local return | ||
logical_processors.erl:15:7: The pattern 'ok' can never match the type 'unknown' | non_neg_integer() |
16 changes: 16 additions & 0 deletions
16
lib/dialyzer/test/small_SUITE_data/src/logical_processors.erl
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,16 @@ | ||
-module(logical_processors). | ||
|
||
-export([t0/0,t1/0,t2/0]). | ||
|
||
t0() -> | ||
unknown = erlang:system_info(logical_processors), | ||
unknown = erlang:system_info(logical_processors_available), | ||
unknown = erlang:system_info(logical_processors_online), | ||
ok. | ||
|
||
t1() -> | ||
ok = erlang:system_info(logical_processors_available). | ||
|
||
t2() -> | ||
ok = erlang:system_info(logical_processors_online). | ||
|