mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
@@ -984,8 +984,7 @@ fn (mut p Parser) closure_vars() []ast.Param {
|
||||
fn (mut p Parser) check_fn_mutable_arguments(typ ast.Type, pos token.Position) {
|
||||
sym := p.table.get_type_symbol(typ)
|
||||
if sym.kind in [.array, .array_fixed, .interface_, .map, .placeholder, .struct_, .generic_inst,
|
||||
.sum_type,
|
||||
] {
|
||||
.sum_type] {
|
||||
return
|
||||
}
|
||||
if typ.is_ptr() || typ.is_pointer() {
|
||||
|
||||
@@ -528,12 +528,14 @@ fn (mut p Parser) interface_decl() ast.InterfaceDecl {
|
||||
}
|
||||
// field_names << name
|
||||
args2, _, is_variadic := p.fn_args() // TODO merge ast.Param and ast.Arg to avoid this
|
||||
mut args := [ast.Param{
|
||||
name: 'x'
|
||||
is_mut: is_mut
|
||||
typ: typ
|
||||
is_hidden: true
|
||||
}]
|
||||
mut args := [
|
||||
ast.Param{
|
||||
name: 'x'
|
||||
is_mut: is_mut
|
||||
typ: typ
|
||||
is_hidden: true
|
||||
},
|
||||
]
|
||||
args << args2
|
||||
mut method := ast.FnDecl{
|
||||
name: name
|
||||
|
||||
Reference in New Issue
Block a user