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

compiler: generics - support across modules/files

This commit is contained in:
joe-conigliaro
2019-11-22 16:22:11 +11:00
committed by Alexander Medvednikov
parent 7c802f31d3
commit 8fbfceed30
8 changed files with 156 additions and 195 deletions

View File

@@ -49,7 +49,7 @@ fn (p mut Parser) register_import_alias(alias string, mod string, tok_idx int) {
if alias in p.import_table.imports && p.import_table.imports[alias] != mod {
p.error('cannot import $mod as $alias: import name $alias already in use"')
}
if mod.contains('.internal.') {
if mod.contains('.internal.') && !p.is_vgen {
mod_parts := mod.split('.')
mut internal_mod_parts := []string
for part in mod_parts {