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

don't allow calling private functions/methods

This commit is contained in:
Alexander Medvednikov
2019-06-26 12:56:49 +02:00
parent 2a3cf0bec9
commit c860bac7bf
8 changed files with 39 additions and 28 deletions

View File

@ -4,19 +4,29 @@
module rand
#include <time.h>
//#include <time.h>
struct C.time_t{}
fn C.rand() int
fn seed() {
struct LOLLO {
}
fn kek() {
}
pub fn seed() {
# time_t t;
# srand((unsigned) time(&t));
}
fn next(max int) int {
fn ffkek() {
}
pub fn next(max int) int {
r := 0
# r = rand(); // TODO parser bug `rand` module name conflict
return r % max
}
struct C.time_t{}
fn C.rand() int