mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: cast correctly strings between byte* and char* when needed
This commit is contained in:

committed by
Alexander Medvednikov

parent
0a0d6536c2
commit
ad32a3770b
@ -608,7 +608,7 @@ fn type_default(typ string) string {
|
||||
// Default values for other types are not needed because of mandatory initialization
|
||||
switch typ {
|
||||
case 'bool': return '0'
|
||||
case 'string': return 'tos("", 0)'
|
||||
case 'string': return 'tos((byte *)"", 0)'
|
||||
case 'i8': return '0'
|
||||
case 'i16': return '0'
|
||||
case 'i32': return '0'
|
||||
|
Reference in New Issue
Block a user