mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: fix latest ci errors (#14957)
This commit is contained in:
parent
3f3fb5be47
commit
fab5802deb
@ -1,7 +1,5 @@
|
||||
vlib/v/checker/tests/sum.vv:2:14: warning: arrays of references need to be initialized right away (unless used inside `unsafe`)
|
||||
vlib/v/checker/tests/ptr_array_init.vv:2:14: warning: arrays of references need to be initialized right away (unless used inside `unsafe`)
|
||||
1 | fn main() {
|
||||
2 | println(*[]&int{len: 1}[0])
|
||||
| ~~~~~~~
|
||||
3 | }
|
||||
4 |
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
vlib/v/checker/tests/shared_element_lock.vv:43:11: warning: arrays of references need to be initialized right away (unless used inside `unsafe`)
|
||||
41 | shared g := Pro{}
|
||||
42 | g.pers.age = 42
|
||||
43 | mut h := []shared Pro{len: 3}
|
||||
| ~~~~~~~~~~~~~
|
||||
44 | h[2].pers.age = 42
|
||||
45 | println(h[2].pers.age)
|
||||
vlib/v/checker/tests/shared_element_lock.vv:36:5: error: `pr.pe` is `shared` and needs explicit lock for `v.ast.SelectorExpr`
|
||||
34 | }
|
||||
35 | }
|
||||
|
@ -513,7 +513,7 @@ pub fn (mut e Eval) expr(expr ast.Expr, expecting ast.Type) Object {
|
||||
ast.ChanInit, ast.Comment, ast.ComptimeCall, ast.ComptimeSelector, ast.ComptimeType,
|
||||
ast.ConcatExpr, ast.DumpExpr, ast.EmptyExpr, ast.EnumVal, ast.GoExpr, ast.IfGuardExpr,
|
||||
ast.IndexExpr, ast.IsRefType, ast.Likely, ast.LockExpr, ast.MapInit, ast.MatchExpr,
|
||||
ast.NodeError, ast.None, ast.OffsetOf, ast.OrExpr, ast.RangeExpr, ast.SelectExpr,
|
||||
ast.Nil, ast.NodeError, ast.None, ast.OffsetOf, ast.OrExpr, ast.RangeExpr, ast.SelectExpr,
|
||||
ast.SqlExpr, ast.TypeNode, ast.TypeOf, ast.UnsafeExpr {
|
||||
e.error('unhandled expression ${typeof(expr).name}')
|
||||
}
|
||||
|
@ -597,6 +597,7 @@ pub fn (mut f Gen) expr(node_ ast.Expr) {
|
||||
ast.MatchExpr {
|
||||
f.match_expr(node)
|
||||
}
|
||||
ast.Nil {}
|
||||
ast.None {
|
||||
f.write('none')
|
||||
}
|
||||
|
@ -959,6 +959,7 @@ fn (mut g JsGen) expr(node_ ast.Expr) {
|
||||
ast.LockExpr {
|
||||
g.gen_lock_expr(node)
|
||||
}
|
||||
ast.Nil {}
|
||||
ast.NodeError {}
|
||||
ast.Nil {
|
||||
g.write('null')
|
||||
|
@ -33,13 +33,15 @@ mut:
|
||||
}
|
||||
|
||||
fn new_normal_test_runner() &TestRunner {
|
||||
mut tr := &NormalTestRunner{}
|
||||
tr.use_color = term.can_show_color_on_stderr()
|
||||
tr.use_relative_paths = match os.getenv('VERROR_PATHS') {
|
||||
'absolute' { false }
|
||||
else { true }
|
||||
unsafe {
|
||||
mut tr := &NormalTestRunner{}
|
||||
tr.use_color = term.can_show_color_on_stderr()
|
||||
tr.use_relative_paths = match os.getenv('VERROR_PATHS') {
|
||||
'absolute' { false }
|
||||
else { true }
|
||||
}
|
||||
return tr
|
||||
}
|
||||
return tr
|
||||
}
|
||||
|
||||
fn (mut runner NormalTestRunner) free() {
|
||||
|
Loading…
Reference in New Issue
Block a user