checker: 1 line v fmt fix
parent
fb4550e582
commit
a1593e7db8
|
@ -2286,8 +2286,7 @@ pub fn (mut c Checker) expr(node ast.Expr) table.Type {
|
||||||
}
|
}
|
||||||
c.error(error_msg, node.pos)
|
c.error(error_msg, node.pos)
|
||||||
}
|
}
|
||||||
} else if !node.expr_type.is_int() && node.expr_type != table.voidptr_type &&
|
} else if !node.expr_type.is_int() && node.expr_type != table.voidptr_type && !node.expr_type.is_ptr() &&
|
||||||
!node.expr_type.is_ptr() &&
|
|
||||||
to_type_sym.kind == .byte {
|
to_type_sym.kind == .byte {
|
||||||
type_name := c.table.type_to_str(node.expr_type)
|
type_name := c.table.type_to_str(node.expr_type)
|
||||||
c.error('cannot cast type `$type_name` to `byte`', node.pos)
|
c.error('cannot cast type `$type_name` to `byte`', node.pos)
|
||||||
|
|
Loading…
Reference in New Issue