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

vfmt: handle comments in const blocks

This commit is contained in:
Alexander Medvednikov
2020-05-12 00:09:59 +02:00
parent b74f4ee3ec
commit 1c8e14c77c
8 changed files with 60 additions and 27 deletions

View File

@@ -462,10 +462,14 @@ pub fn (t &Table) check(got, expected Type) bool {
if exp_idx == any_type_idx || got_idx == any_type_idx {
return true
}
// TODO i64 as int etc
if (exp_idx in pointer_type_idxs || exp_idx in number_type_idxs) && (got_idx in pointer_type_idxs ||
got_idx in number_type_idxs) {
return true
}
//if exp_idx in pointer_type_idxs && got_idx in pointer_type_idxs {
//return true
//}
// see hack in checker IndexExpr line #691
if (got_idx == byte_type_idx && exp_idx == byteptr_type_idx) || (exp_idx == byte_type_idx &&
got_idx == byteptr_type_idx) {