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

compiler: allow function expecting a void* to receive a byteptr

This commit is contained in:
bogen85
2019-11-28 00:44:43 -06:00
committed by Alexander Medvednikov
parent e63300e286
commit 9374168b26
2 changed files with 38 additions and 18 deletions

19
vlib/builtin/isnil_test.v Normal file
View File

@@ -0,0 +1,19 @@
fn test_isnil_byteptr(){
pb := byteptr(0)
assert isnil( pb )
}
fn test_isnil_voidptr(){
pv := voidptr(0)
assert isnil( pv )
}
fn test_isnil_charptr(){
pc := &char(0)
assert isnil( pc )
}
fn test_isnil_intptr(){
pi := &int(0)
assert isnil( pi )
}