mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: check none
properly
This commit is contained in:
parent
a0ca68ce3f
commit
7e71799980
@ -440,8 +440,7 @@ pub fn (t &Table) check(got, expected Type) bool {
|
|||||||
// and the other is not, is this correct behaviour?
|
// and the other is not, is this correct behaviour?
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if got_idx == none_type_idx {
|
if got_idx == none_type_idx && expected.flag_is(.optional) {
|
||||||
// TODO
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// allow pointers to be initialized with 0. TODO: use none instead
|
// allow pointers to be initialized with 0. TODO: use none instead
|
||||||
|
Loading…
Reference in New Issue
Block a user