mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: add a temporary exception for C.statvfs
as well (same name reused for function *and* struct)
This commit is contained in:
parent
d1f57ead71
commit
5abca37ff7
@ -2516,7 +2516,8 @@ pub fn (mut p Parser) name_expr() ast.Expr {
|
||||
// type cast. TODO: finish
|
||||
// if name in ast.builtin_type_names_to_idx {
|
||||
if (!known_var && (name in p.table.type_idxs || name_w_mod in p.table.type_idxs)
|
||||
&& name !in ['C.stat', 'C.sigaction']) || is_mod_cast || is_generic_cast
|
||||
&& name !in ['C.statvfs', 'C.stat', 'C.sigaction']) || is_mod_cast
|
||||
|| is_generic_cast
|
||||
|| (language == .v && name.len > 0 && name[0].is_capital()) {
|
||||
// MainLetter(x) is *always* a cast, as long as it is not `C.`
|
||||
// TODO handle C.stat()
|
||||
|
Loading…
Reference in New Issue
Block a user