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

cgen: improve auto_str error messages (#12972)

This commit is contained in:
yuyi 2021-12-27 00:32:15 +08:00 committed by GitHub
parent 55d9c24063
commit 2e68af22d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,7 @@ fn (mut g Gen) gen_str_default(sym ast.TypeSymbol, styp string, str_fn_name stri
convertor = 'bool'
typename_ = 'bool'
} else {
verror("could not generate string method for type '$styp'")
verror('could not generate string method for type `$styp`')
}
g.type_definitions.writeln('string ${str_fn_name}($styp it); // auto')
g.auto_str_funcs.writeln('string ${str_fn_name}($styp it) {')
@ -220,7 +220,7 @@ fn (mut g Gen) final_gen_str(typ StrType) {
g.gen_str_for_thread(sym.info, styp, str_fn_name)
}
else {
verror("could not generate string method $str_fn_name for type '$styp'")
verror('could not generate string method `$str_fn_name` for type `$styp`')
}
}
}