mirror of
https://github.com/vlang/v.git
synced 2025-09-14 15:02:33 +03:00
fix 'v -debug examples/hello_world.v'
This commit is contained in:
parent
1b79964827
commit
f3abb9e682
3 changed files with 7 additions and 10 deletions
|
@ -44,7 +44,7 @@ fn (f &Fn) v_definition() string {
|
|||
if i == 0 && f.is_method { // skip the receiver
|
||||
continue
|
||||
}
|
||||
typ := v_type_str(arg.typ)
|
||||
typ := v_type_str(arg.typ).replace('*', '&')
|
||||
if arg.name == '' {
|
||||
sb.write(typ)
|
||||
} else {
|
||||
|
@ -56,7 +56,7 @@ fn (f &Fn) v_definition() string {
|
|||
}
|
||||
sb.write(')')
|
||||
if f.typ != 'void' {
|
||||
typ := v_type_str(f.typ)
|
||||
typ := v_type_str(f.typ).replace('*', '&')
|
||||
sb.write(' ')
|
||||
sb.write(typ)
|
||||
sb.writeln(' ')
|
||||
|
@ -170,7 +170,7 @@ fn (v &V) generate_vh() {
|
|||
if field.access_mod == .public {
|
||||
continue
|
||||
}
|
||||
field_type := v_type_str(field.typ)
|
||||
field_type := v_type_str(field.typ).replace('*', '&')
|
||||
file.writeln('\t$field.name $field_type')
|
||||
}
|
||||
//file.writeln('pub:')
|
||||
|
@ -179,7 +179,7 @@ fn (v &V) generate_vh() {
|
|||
if field.access_mod == .private {
|
||||
continue
|
||||
}
|
||||
field_type := v_type_str(field.typ)
|
||||
field_type := v_type_str(field.typ).replace('*', '&')
|
||||
public_str += '\t$field.name $field_type\n'
|
||||
//file.writeln('\t$field.name $field_type')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue