1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: atomic int fixes

This commit is contained in:
Alexander Medvednikov
2022-04-27 18:31:21 +03:00
parent 82ac39eca6
commit 7dbfa86f25
5 changed files with 39 additions and 3 deletions

View File

@@ -401,10 +401,13 @@ pub fn (mut p Parser) parse_type() ast.Type {
p.error_with_pos('cannot use `mut` on struct field type', p.tok.pos())
}
}
if p.tok.kind == .key_mut || is_shared || is_atomic {
if p.tok.kind == .key_mut || is_shared { // || is_atomic {
nr_muls++
p.next()
}
if is_atomic {
p.next()
}
if p.tok.kind == .mul {
p.error('use `&Type` instead of `*Type` when declaring references')
return 0