mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
remove is_play
This commit is contained in:
@ -531,10 +531,6 @@ fn (p mut Parser) _check_types(got_, expected_ string, throw bool) bool {
|
||||
}
|
||||
// Todo void* allows everything right now
|
||||
if got=='void*' || expected=='void*' {// || got == 'cvoid' || expected == 'cvoid' {
|
||||
// if !p.builtin_mod {
|
||||
if p.pref.is_play {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
// TODO only allow numeric consts to be assigned to bytes, and
|
||||
@ -570,20 +566,18 @@ fn (p mut Parser) _check_types(got_, expected_ string, throw bool) bool {
|
||||
return true
|
||||
}
|
||||
// NsColor* return 0
|
||||
if !p.pref.is_play {
|
||||
if expected.ends_with('*') && got == 'int' {
|
||||
return true
|
||||
}
|
||||
// if got == 'T' || got.contains('<T>') {
|
||||
// return true
|
||||
// }
|
||||
// if expected == 'T' || expected.contains('<T>') {
|
||||
// return true
|
||||
// }
|
||||
// Allow pointer arithmetic
|
||||
if expected=='void*' && got=='int' {
|
||||
return true
|
||||
}
|
||||
if expected.ends_with('*') && got == 'int' {
|
||||
return true
|
||||
}
|
||||
// if got == 'T' || got.contains('<T>') {
|
||||
// return true
|
||||
// }
|
||||
// if expected == 'T' || expected.contains('<T>') {
|
||||
// return true
|
||||
// }
|
||||
// Allow pointer arithmetic
|
||||
if expected=='void*' && got=='int' {
|
||||
return true
|
||||
}
|
||||
expected = expected.replace('*', '')
|
||||
got = got.replace('*', '')
|
||||
|
Reference in New Issue
Block a user