mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v2: add UnsafeStmt to checker & byte/byteptr to check
This commit is contained in:
@@ -398,8 +398,10 @@ pub fn (t &Table) check(got, expected Type) bool {
|
||||
if got_type_sym.is_number() && exp_type_sym.is_number() {
|
||||
return true
|
||||
}
|
||||
// check hack in checker IndexExpr line #691
|
||||
if type_is_ptr(got) && got_type_sym.kind == .byte && exp_type_sym.kind == .byteptr {
|
||||
// TODO: actually check for & handle pointers with name_expr
|
||||
// see hack in checker IndexExpr line #691
|
||||
if (got_type_sym.kind == .byte && exp_type_sym.kind == .byteptr) ||
|
||||
(exp_type_sym.kind == .byte && got_type_sym.kind == .byteptr) {
|
||||
return true
|
||||
}
|
||||
// TODO
|
||||
|
||||
Reference in New Issue
Block a user