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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user