checker, builtin: prepage for builtin channels (#6262)
parent
d88e8bb9ea
commit
c351f8fa47
vlib/v
|
@ -197,7 +197,7 @@ Did you forget to add vlib to the path? (Use @vlib for default vlib)')
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (v &Builder) get_user_files() []string {
|
pub fn (v &Builder) get_user_files() []string {
|
||||||
if v.pref.path in ['vlib/builtin', 'vlib/strconv', 'vlib/strings', 'vlib/hash'] {
|
if v.pref.path in ['vlib/builtin', 'vlib/strconv', 'vlib/strings', 'vlib/hash', 'vlib/time'] {
|
||||||
// This means we are building a builtin module with `v build-module vlib/strings` etc
|
// This means we are building a builtin module with `v build-module vlib/strings` etc
|
||||||
// get_builtin_files() has already added the files in this module,
|
// get_builtin_files() has already added the files in this module,
|
||||||
// do nothing here to avoid duplicate definition errors.
|
// do nothing here to avoid duplicate definition errors.
|
||||||
|
|
|
@ -53,6 +53,9 @@ pub fn (mut p Parser) parse_map_type() table.Type {
|
||||||
|
|
||||||
pub fn (mut p Parser) parse_chan_type() table.Type {
|
pub fn (mut p Parser) parse_chan_type() table.Type {
|
||||||
p.next()
|
p.next()
|
||||||
|
if p.tok.kind != .name && p.tok.kind != .key_mut && p.tok.kind != .amp {
|
||||||
|
return table.chan_type
|
||||||
|
}
|
||||||
elem_type := p.parse_type()
|
elem_type := p.parse_type()
|
||||||
idx := p.table.find_or_register_chan(elem_type)
|
idx := p.table.find_or_register_chan(elem_type)
|
||||||
return table.new_type(idx)
|
return table.new_type(idx)
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub const (
|
||||||
|
|
||||||
// math.bits is needed by strconv.ftoa
|
// math.bits is needed by strconv.ftoa
|
||||||
pub const (
|
pub const (
|
||||||
builtin_module_parts = ['math.bits', 'strconv', 'strconv.ftoa', 'hash', 'strings', 'builtin']
|
builtin_module_parts = ['math.bits', 'strconv', 'strconv.ftoa', 'hash', 'strings', 'time', 'builtin']
|
||||||
)
|
)
|
||||||
|
|
||||||
pub const (
|
pub const (
|
||||||
|
|
Loading…
Reference in New Issue