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

force mut a := ..., do not allow mut a = ...

This commit is contained in:
Alexander Medvednikov
2019-06-28 14:19:46 +02:00
parent 806ad80360
commit 42bb85197a
6 changed files with 15 additions and 31 deletions

View File

@ -531,7 +531,7 @@ fn (p mut Parser) fn_call(f Fn, method_ph int, receiver_var, receiver_type strin
if !receiver.is_mut && receiver_type.contains('*') {
method_call += '*'
}
mut cast = ''
mut cast := ''
// Method returns (void*) => cast it to int, string, user etc
// number := *(int*)numbers.first()
if f.typ == 'void*' {