-
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 branch 'john/dialyzer/fix-opaque-crash/ERIERL-1183/OTP-19439' i…
…nto maint-26 * john/dialyzer/fix-opaque-crash/ERIERL-1183/OTP-19439: dialyzer: Fix opaque-related crash
- Loading branch information
Showing
3 changed files
with
28 additions
and
0 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
19 changes: 19 additions & 0 deletions
19
lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_bug6.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,19 @@ | ||
-module(opaque_bug6). | ||
|
||
-export([loop/1]). | ||
-export_type([unused_dummy/0]). | ||
|
||
-type other_type() :: opaque_bug6_adt:adt(). | ||
|
||
%% Required for decorate/3 to be called, jarring the bug loose. Does not need | ||
%% to be used anywhere. | ||
-opaque unused_dummy() :: {pid(), binary()}. | ||
|
||
-spec loop(other_type()) -> no_return(). | ||
loop(OtherType) -> | ||
receive | ||
_X -> | ||
loop(OtherType) | ||
after timer:minutes(30) -> | ||
opaque_bug6_adt:do(OtherType) | ||
end. |
8 changes: 8 additions & 0 deletions
8
lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_bug6_adt.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,8 @@ | ||
-module(opaque_bug6_adt). | ||
-export([do/1]). | ||
|
||
-export_type([adt/0]). | ||
-opaque adt() :: {a, term()}. | ||
|
||
-spec do(adt()) -> ok | {error, atom()}. | ||
do({Mod, Arg}) -> Mod:foo(Arg). |