From 9800cf1e7bc7c1952ab1e1bd45fc1851c0cd1818 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 12 Aug 2020 03:54:14 +0200 Subject: [PATCH] checker: improve array errors; gg: remove unused imports --- vlib/gg/gg.v | 1 - vlib/gg/image.v | 6 +++--- vlib/v/checker/checker.v | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vlib/gg/gg.v b/vlib/gg/gg.v index 803ccb5d42..2b1778840f 100644 --- a/vlib/gg/gg.v +++ b/vlib/gg/gg.v @@ -3,7 +3,6 @@ module gg import gx -import os import sokol import sokol.sapp import sokol.sgl diff --git a/vlib/gg/image.v b/vlib/gg/image.v index c122efbb1b..18855699c4 100644 --- a/vlib/gg/image.v +++ b/vlib/gg/image.v @@ -2,12 +2,12 @@ // Use of this source code is governed by an MIT license that can be found in the LICENSE file. module gg -import gx +//import gx import os import sokol -import sokol.sapp +//import sokol.sapp import sokol.sgl -import sokol.gfx +//import sokol.gfx import stbi pub struct Image { diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index c12a8ea45e..93fbde4eaf 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -3237,7 +3237,8 @@ pub fn (mut c Checker) error(message string, pos token.Position) { if c.pref.is_verbose { 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) {