mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: allow fn == 0
comparison for now
This commit is contained in:
parent
a6dfc6d46b
commit
b0c710c985
@ -497,6 +497,11 @@ pub fn (t &Table) check(got, expected Type) bool {
|
|||||||
// println(info.gen_types)
|
// println(info.gen_types)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if exp_type_sym.kind == .function && got_type_sym.kind == .int {
|
||||||
|
// TODO temporary
|
||||||
|
// fn == 0
|
||||||
|
return true
|
||||||
|
}
|
||||||
// allow enum value to be used as int
|
// allow enum value to be used as int
|
||||||
if (got_type_sym.is_int() && exp_type_sym.kind == .enum_) || (exp_type_sym.is_int() &&
|
if (got_type_sym.is_int() && exp_type_sym.kind == .enum_) || (exp_type_sym.is_int() &&
|
||||||
got_type_sym.kind == .enum_) {
|
got_type_sym.kind == .enum_) {
|
||||||
|
Loading…
Reference in New Issue
Block a user