compiler: allow function expecting a void* to receive a byteptr
parent
e63300e286
commit
9374168b26
|
@ -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 )
|
||||
}
|
|
@ -1161,6 +1161,7 @@ fn (p mut Parser) fn_call_args(f mut Fn) {
|
|||
}
|
||||
// println('\ne:"$expected" got:"$got"')
|
||||
else if ! (expected == 'void*' && got == 'int') &&
|
||||
! (expected == 'void*' && got == 'byteptr') &&
|
||||
! (expected == 'byte*' && got.contains(']byte')) &&
|
||||
! (expected == 'byte*' && got == 'string') &&
|
||||
//! (expected == 'void*' && got == 'array_int') {
|
||||
|
|
Loading…
Reference in New Issue