checker: improve array errors; gg: remove unused imports

pull/6115/head
Alexander Medvednikov 2020-08-12 03:54:14 +02:00
parent bb93bf34ec
commit 9800cf1e7b
3 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,6 @@
module gg module gg
import gx import gx
import os
import sokol import sokol
import sokol.sapp import sokol.sapp
import sokol.sgl import sokol.sgl

View File

@ -2,12 +2,12 @@
// Use of this source code is governed by an MIT license that can be found in the LICENSE file. // Use of this source code is governed by an MIT license that can be found in the LICENSE file.
module gg module gg
import gx //import gx
import os import os
import sokol import sokol
import sokol.sapp //import sokol.sapp
import sokol.sgl import sokol.sgl
import sokol.gfx //import sokol.gfx
import stbi import stbi
pub struct Image { pub struct Image {

View File

@ -3237,7 +3237,8 @@ pub fn (mut c Checker) error(message string, pos token.Position) {
if c.pref.is_verbose { if c.pref.is_verbose {
print_backtrace() print_backtrace()
} }
c.warn_or_error(message, pos, false) msg := message.replace('`array_', '`[]')
c.warn_or_error(msg, pos, false)
} }
fn (mut c Checker) warn_or_error(message string, pos token.Position, warn bool) { fn (mut c Checker) warn_or_error(message string, pos token.Position, warn bool) {