-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(no_successive_maps): prevent failing on nested maps (#372)
* fix(no_successive_maps): prevent failing on nested maps * fix otp 27
- Loading branch information
Showing
3 changed files
with
51 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
-module(fail_no_successive_maps2). | ||
|
||
-export([test1/0, test2/0]). | ||
|
||
-if(?OTP_RELEASE<27). | ||
test1() -> | ||
_ = #{ | ||
x => [ | ||
#{a => b, c => d}, | ||
#{a => b, c => d} % expected a warning here | ||
#{a => b, c => d}, | ||
#{a => b, c => d} | ||
] | ||
}. | ||
-else. | ||
test1() -> | ||
#{}. | ||
-endif. | ||
|
||
-if(?OTP_RELEASE<27). | ||
test2() -> | ||
_ = #{ | ||
map => #{ | ||
x => [ | ||
#{a => b, c => d}, | ||
#{a => b, c => d} % expected a warning here | ||
#{a => b, c => d}, | ||
#{a => b, c => d} | ||
], | ||
y => [ | ||
#{a => b, c => d}, | ||
#{a => b, c => d} % expected a warning here | ||
#{a => b, c => d}, | ||
#{a => b, c => d} | ||
] | ||
} | ||
}. | ||
-else. | ||
test2() -> | ||
#{}. | ||
-endif. |
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