This commit is contained in:
Alexander Medvednikov 2023-09-30 15:08:26 +03:00
parent 5cc1db8318
commit 5b1b2cc7c0
5 changed files with 5 additions and 6 deletions

View file

@ -104,7 +104,7 @@
- github: improve the voting message for issues (#19448) - github: improve the voting message for issues (#19448)
- vcreate: update templates, add `lib` (#19444) - vcreate: update templates, add `lib` (#19444)
### Operating System support #### Operating System support
- builtin: use `libgc-threaded` on FreeBSD, to get the threaded version of libgc (#19294) - builtin: use `libgc-threaded` on FreeBSD, to get the threaded version of libgc (#19294)
#### Examples #### Examples

2
v.mod
View file

@ -1,7 +1,7 @@
Module { Module {
name: 'V' name: 'V'
description: 'The V programming language.' description: 'The V programming language.'
version: '0.4.1' version: '0.4.2'
license: 'MIT' license: 'MIT'
repo_url: 'https://github.com/vlang/v' repo_url: 'https://github.com/vlang/v'
dependencies: [] dependencies: []

View file

@ -1,5 +1,5 @@
Module { Module {
name: 'semver' name: 'semver'
version: '0.4.1' version: '0.4.2'
deps: [] deps: []
} }

View file

@ -4804,8 +4804,7 @@ fn (mut c Checker) ensure_type_exists(typ ast.Type, pos token.Pos) bool {
return false return false
} }
sym := c.table.sym(typ) sym := c.table.sym(typ)
if !c.is_builtin_mod && sym.kind == .struct_ && !sym.is_pub && sym.language == .v if !c.is_builtin_mod && sym.kind == .struct_ && !sym.is_pub && sym.mod != c.mod {
&& sym.mod != c.mod {
c.error('struct `${sym.name}` was declared as private to module `${sym.mod}`, so it can not be used inside module `${c.mod}`', c.error('struct `${sym.name}` was declared as private to module `${sym.mod}`, so it can not be used inside module `${c.mod}`',
pos) pos)
return false return false

View file

@ -2,7 +2,7 @@ module version
import os import os
pub const v_version = '0.4.1' pub const v_version = '0.4.2'
// vhash() returns the build string C.V_COMMIT_HASH . See cmd/tools/gen_vc.v . // vhash() returns the build string C.V_COMMIT_HASH . See cmd/tools/gen_vc.v .
pub fn vhash() string { pub fn vhash() string {