charptr fix

pull/2944/head
Alexander Medvednikov 2019-12-01 10:11:05 +03:00
parent 0999273d32
commit 698c3823ee
1 changed files with 7 additions and 1 deletions

View File

@ -640,6 +640,12 @@ fn (p mut Parser) check_types2(got_, expected_ string, throw bool) bool {
if got=='byte*' && expected=='byteptr' {
return true
}
if got=='charptr' && expected=='char*' {
return true
}
if got=='char*' && expected=='charptr' {
return true
}
if got=='int' && expected=='byte*' {
return true
}
@ -647,7 +653,7 @@ fn (p mut Parser) check_types2(got_, expected_ string, throw bool) bool {
//return true
//}
// byteptr += int
if got=='int' && expected=='byteptr' {
if got=='int' && expected in ['byteptr', 'charptr'] {
return true
}
if got == 'Option' && expected.starts_with('Option_') {