diff --git a/vlib/regex/regex.v b/vlib/regex/regex.v index 4915839c09..13b28fa17b 100644 --- a/vlib/regex/regex.v +++ b/vlib/regex/regex.v @@ -314,7 +314,7 @@ pub mut: group_max_nested int = 3 // max nested group group_max int = 8 // max allowed number of different groups - group_csave []int = []int // groups continuous save array + group_csave []int = []int{} // groups continuous save array group_csave_index int= -1 // groups continuous save index group_map map[string]int // groups names map diff --git a/vlib/regex/regex_test.v b/vlib/regex/regex_test.v index 2a0d37af6e..fa42f022ca 100644 --- a/vlib/regex/regex_test.v +++ b/vlib/regex/regex_test.v @@ -173,7 +173,7 @@ fn test_regex(){ // debug print //println("#$c [$to.src] q[$to.q] ($to.s, $to.e)") - mut re, re_err, err_pos := regex.regex(to.q) + mut re, re_err, _ := regex.regex(to.q) re.group_csave = [-1].repeat(3*20+1) if re_err == regex.COMPILE_OK { @@ -219,7 +219,7 @@ fn test_regex(){ } // check find_all - for c,to in match_test_suite_fa{ + for _,to in match_test_suite_fa{ // debug print //println("#$c [$to.src] q[$to.q] $to.r") @@ -249,7 +249,7 @@ fn test_regex(){ } // check replace - for c,to in match_test_suite_re{ + for _,to in match_test_suite_re{ // debug print //println("#$c [$to.src] q[$to.q] $to.r")