interface: fix function is private bug
parent
60c4d99407
commit
74dbb1bce3
|
@ -503,7 +503,7 @@ fn (p mut Parser) async_fn_call(f Fn, method_ph int, receiver_var, receiver_type
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (p mut Parser) fn_call(f Fn, method_ph int, receiver_var, receiver_type string) {
|
fn (p mut Parser) fn_call(f Fn, method_ph int, receiver_var, receiver_type string) {
|
||||||
if !f.is_public && !f.is_c && !p.pref.is_test && f.pkg != p.pkg {
|
if !f.is_public && !f.is_c && !p.pref.is_test && !f.is_interface && f.pkg != p.pkg {
|
||||||
p.error('function `$f.name` is private')
|
p.error('function `$f.name` is private')
|
||||||
}
|
}
|
||||||
p.calling_c = f.is_c
|
p.calling_c = f.is_c
|
||||||
|
|
|
@ -172,6 +172,7 @@ fn (arr mut array) _push(val voidptr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// `val` is array.data
|
// `val` is array.data
|
||||||
|
// TODO make private, right now it's used by strings.Builder
|
||||||
pub fn (arr mut array) _push_many(val voidptr, size int) {
|
pub fn (arr mut array) _push_many(val voidptr, size int) {
|
||||||
if arr.len >= arr.cap - size {
|
if arr.len >= arr.cap - size {
|
||||||
cap := (arr.len + size) * 2
|
cap := (arr.len + size) * 2
|
||||||
|
|
Loading…
Reference in New Issue