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

parser: allow ! only with bools

This commit is contained in:
luoheng
2019-09-21 23:21:45 +08:00
committed by Alexander Medvednikov
parent c01edc650d
commit f1d5f8e2bf
5 changed files with 50 additions and 39 deletions

View File

@@ -10,7 +10,7 @@ module gl
pub fn init_glad() {
ok := C.gladLoadGL()
if !ok {
if isnil(ok) {
println('Failed to initialize glad OpenGL context')
exit(1)
}

View File

@@ -513,7 +513,7 @@ fn _parse(rawurl string, via_request bool) ?URL {
}
}
if (url.scheme != '' || !via_request && !rest.starts_with('///')) && rest.starts_with('//') {
if ((url.scheme != '' || !via_request) && !rest.starts_with('///')) && rest.starts_with('//') {
parts := split(rest.right(2), '/', false)
authority := parts[0]
rest = parts[1]