mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: check duplicates on match with no else
Refactor match duplication test to work even if there is not else, and to include every expression. Add tests for duplicate expressions in match.
This commit is contained in:
18
vlib/os/os.v
18
vlib/os/os.v
@@ -467,28 +467,30 @@ pub fn sigint_to_signal_name(si int) string {
|
||||
$if linux {
|
||||
// From `man 7 signal` on linux:
|
||||
match si {
|
||||
30, 10, 16 {
|
||||
// TODO dependent on platform
|
||||
// works only on x86/ARM/most others
|
||||
10 /*, 30, 16 */ {
|
||||
return 'SIGUSR1'
|
||||
}
|
||||
31, 12, 17 {
|
||||
12 /*, 31, 17 */ {
|
||||
return 'SIGUSR2'
|
||||
}
|
||||
20, 17, 18 {
|
||||
17 /*, 20, 18 */ {
|
||||
return 'SIGCHLD'
|
||||
}
|
||||
19, 18, 25 {
|
||||
18 /*, 19, 25 */ {
|
||||
return 'SIGCONT'
|
||||
}
|
||||
17, 19, 23 {
|
||||
19 /*, 17, 23 */ {
|
||||
return 'SIGSTOP'
|
||||
}
|
||||
18, 20, 24 {
|
||||
20 /*, 18, 24 */ {
|
||||
return 'SIGTSTP'
|
||||
}
|
||||
21, 21, 26 {
|
||||
21 /*, 26 */ {
|
||||
return 'SIGTTIN'
|
||||
}
|
||||
22, 22, 27 {
|
||||
22 /*, 27 */ {
|
||||
return 'SIGTTOU'
|
||||
}
|
||||
// /////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user