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

do not allow declaring a mutable variable if it's never modified

This commit is contained in:
Alexander Medvednikov
2019-07-25 13:16:17 +02:00
parent dbf027acb8
commit 9ccd3bde01
4 changed files with 47 additions and 19 deletions

View File

@ -695,11 +695,10 @@ fn (table &Table) qualify_module(mod string, file_path string) string {
}
fn new_file_import_table(file_path string) *FileImportTable {
mut t := &FileImportTable{
return &FileImportTable{
file_path: file_path
imports: map[string]string{}
}
return t
}
fn (fit &FileImportTable) known_import(mod string) bool {