mirror of
https://github.com/vlang/v.git
synced 2025-09-14 15:02:33 +03:00
don't allow calling private functions/methods
This commit is contained in:
parent
2a3cf0bec9
commit
c860bac7bf
8 changed files with 39 additions and 28 deletions
|
@ -511,9 +511,6 @@ fn (p mut Parser) struct_decl() {
|
|||
}
|
||||
// `pub` access mod
|
||||
access_mod := if is_pub{PUBLIC} else { PRIVATE}
|
||||
if typ.name == 'Userf' {
|
||||
println('$field_name $access_mod mut=$is_mut')
|
||||
}
|
||||
p.fgen(' ')
|
||||
field_type := p.get_type()
|
||||
is_atomic := p.tok == ATOMIC
|
||||
|
@ -644,8 +641,8 @@ fn (p mut Parser) check(expected Token) {
|
|||
fn (p mut Parser) error(s string) {
|
||||
// Dump all vars and types for debugging
|
||||
if false {
|
||||
file_types := os.create_file('$TmpPath/types')
|
||||
file_vars := os.create_file('$TmpPath/vars')
|
||||
file_types := os.create('$TmpPath/types')
|
||||
file_vars := os.create('$TmpPath/vars')
|
||||
// ////debug("ALL T", q.J(p.table.types))
|
||||
// os.write_to_file('/var/tmp/lang.types', '')//pes(p.table.types))
|
||||
// //debug("ALL V", q.J(p.table.vars))
|
||||
|
@ -662,7 +659,7 @@ fn (p mut Parser) error(s string) {
|
|||
if p.file_path.contains('v/compiler') || cur_path.contains('v/compiler') {
|
||||
println('\n====================')
|
||||
println('It looks like you are building V. It is being frequently updated every day.' +
|
||||
' Most likely there was a change that lead to this error. ')
|
||||
' If you didn\'t modify the compiler\'s code, most likely there was a change that lead to this error. ')
|
||||
println('Try to run `git pull`, that will most likely fix it.')
|
||||
println('If `git pull` doesn\'t help, re-install V from source or download a precompiled' +
|
||||
' binary from https://vlang.io')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue